摘要: create table temp as select * from testtable; 阅读全文
posted @ 2017-05-15 22:53 Jachin 阅读(386) 评论(0) 推荐(0)
摘要: public class Maopao { public static void main(String[] args) { int[] array={1,2,5,3,10,21,0}; getSortD_X(array); getSortX_D(array); } public static vo 阅读全文
posted @ 2017-05-15 21:58 Jachin 阅读(643) 评论(0) 推荐(0)
摘要: 由?:符号表示的,具体的含义其实就和if-else结构的含义差不多,这种运算符会将某个条件作两种处理,如果满足条件的话就执行第一个结果,如果不满足的话就执行另外一个结果,例如: Int A,B,C; A=2; B=3; C=A>B ? 100 :200; 这条语句的意思是,如果A>B的话,就将100 阅读全文
posted @ 2017-05-15 21:44 Jachin 阅读(288337) 评论(2) 推荐(7)
摘要: “>>>”运算符所作的是无符号的位移处理,它不会将所处理的值的最高位视为正负符号,所以作位移处理时,会直接在空出的高位填入0。当我们要作位移的原始值并非代表数值时(例如:表示颜色图素的值,最高位并非正负号),可能就会需要使用此种无符号的位移。比如: -10>>>2=1073741821 -10=11 阅读全文
posted @ 2017-05-15 04:22 Jachin 阅读(2474) 评论(0) 推荐(0)
摘要: i在前,先引用 i在后,先自增 a=i++;(分解:a=i; i=i+1;)a=++i;(分解:i=i+1;a=i;)这样使用a的值是不一样的 a=1+++i的话就先i=i+1;i=2.然后a=i+1,a=3 阅读全文
posted @ 2017-05-15 04:19 Jachin 阅读(207) 评论(0) 推荐(0)
摘要: 关键字是电脑语言里事先定义的,有特别意义的标识符,有时又叫保留字,还有特别意义的变量。 Java的关键字对Java的编译器有特殊的意义,他们用来表示一种数据类型,或者表示程序的结构等,关键字不能用作变量名、方法名、类名、包名和参数。 Java语言规定关键字不能作为标识符。目前共有50个Java关键字 阅读全文
posted @ 2017-05-15 04:06 Jachin 阅读(476) 评论(0) 推荐(0)
摘要: public class ThreadTest { private int j = 1; //+1 private synchronized void n(){ j++; System.out.println(Thread.currentThread().getName()+"n:"+j); } / 阅读全文
posted @ 2017-05-15 02:51 Jachin 阅读(4783) 评论(0) 推荐(0)
摘要: public class Test2 { static { System.out.println("1"); } { System.out.println("2"); } public Test2() { System.out.println("3"); System.err.println("3" 阅读全文
posted @ 2017-05-14 22:43 Jachin 阅读(189) 评论(0) 推荐(0)
摘要: public class Test{ public static void main(String[] args) { int a=1; try { a=a/0; }catch(Exception e) { System.out.println(“catch”); return;//当return时 阅读全文
posted @ 2017-05-14 21:35 Jachin 阅读(121) 评论(0) 推荐(0)
摘要: NullpointException(空指针异常)ClassNotFoundException(类找不到异常)ClassCastException(类型转换异常)IllegalArgumentException(非法参数异常)ArithmeticException(算术异常)NumberFormat 阅读全文
posted @ 2017-05-14 20:43 Jachin 阅读(183) 评论(0) 推荐(0)