- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 comparable 和 comparator
comparable 和 comparator一、对java对象进行排序需要对java对象进行排序,一般使用Collections.sort(list);。 此时对于比较的对象,要么实现Comparable接口在排序时,指定对应的比较器 public static void sort(List list, Comparator c)演示如下:public
2016-04-10 13:37:08 310
原创 System.out和System.err的并发
System.out和System.err的并发最近在开发时发现,同时使用System.out和System.err打印内容,会出现多线程的现象。代码如下:public class SystemDemo { public static void main(String[] args) { for (int i = 0; i 5; i++) {
2016-04-10 12:03:18 1032
转载 component must be showing on the screen to determine its location
使用JPopupMenu控件时,遭遇component must be showing on the screen to determine its location 在一个Swing开发的应用界面中,使用JPopupMenu控件,结果发现,每次要show这个弹出菜单的时候,总会出现如下异常:java.awt.IllegalComponentStateException: c
2013-04-13 11:29:42 4901 1
转载 linux下的 deb rpm tar.bz2 tar.gz是什么啊
不对,完全不对===============================================rpm和deb跟kde和gnome完全没有关系,kde和gnome是桌面系统。 而rpm和deb则是软件包管理系统, 任何Linux发行版都可以装kde和gnome这两种桌面环境的。而rpm和deb包管理系统则要看是什么Linux发行版了。 一般来说,基于Debian的发行版都用deb,
2013-04-10 14:58:09 789
转载 delphi 控件的安装
先将swflash.ocx控件解析为一个名为pas的文档,然后再将这个文件封装在一个名为Delphi看着activex的包(package)里面,然后再进行安装.1.delphi盒子在菜单栏中选择Component-Import Component.2.delphi2010在弹出的对话框选择Import ActiveX Control,安装flash单击Next.3.在弹出的控件列表中
2013-03-12 10:28:00 509
转载 如何停止JAVA线程(转载)
如何停止JAVA线程如何停止java的线程一直是一个困恼我们开发多线程程序的一个问题。这个问题最终在Java5的java.util.concurrent中得到了回答:使用interrupt(),让线程在run方法中停止。简介在Java的多线程编程中,java.lang.Thread类型包含了一些列的方法start(), stop(), stop(Throwable) and sus
2013-03-12 09:43:21 499 2
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人