1 class SuperClass{ 2 3 public SuperClass() { 4
System.out.println("superclass "); 5 show(); 6 } 7 public void show() { 8
System.out...
分类:
编程语言 时间:
2014-05-10 05:47:03
阅读次数:
299
package mainimport ( "fmt" "sync")var wg
sync.WaitGroupfunc asyncTestFunc() { for i := 0; i < 100; i++ {
fmt.Println(i) } wg.Don...
分类:
其他好文 时间:
2014-05-10 05:35:55
阅读次数:
286
方法一:public class QuickSortExp1{ public static
void main(String[] args){ int[] sortArray = new int[]{5,7,4,2,9,8,3,6};
System.out.println("before sor.....
分类:
编程语言 时间:
2014-05-10 05:08:46
阅读次数:
496
1 public static void main(String[] args) { 2
Integer in1 = 128; 3 Integer in2 = 128; 4 System.out.println(in1 == in2 ); 5...
分类:
其他好文 时间:
2014-05-09 23:50:29
阅读次数:
270
这篇文章总结了关于Java构造的常见??问题。
1)为什么创建一个子类对象要也需要调用父类的构造函数?
class Super {
String s;
public Super(){
System.out.println("Super");
}
}
public class Sub extends Super {
public Sub(){...
分类:
编程语言 时间:
2014-05-09 22:44:26
阅读次数:
443
出自《Java深入解析》的例子例1、先看一段代码:public static void
main(String[] args) { double d1 = 0.1; double d2 = 0.2; System.out.println("" +
d1 + ...
分类:
编程语言 时间:
2014-05-09 13:24:54
阅读次数:
356
Map map = new
TreeMap();//TreeMap本身具有排序功能(默认按键升序排序)map.put(12, "hello");map.put(7,
"bravestarr");map.put(20, "world");System.out.println(map.toString(...
分类:
其他好文 时间:
2014-05-09 09:28:49
阅读次数:
282
public class sample{public static void
main(String[]
args){//得到类的简写名称System.out.println(sample.class.getSimpleName());//得到对象的全路径System.out.println(sam...
分类:
其他好文 时间:
2014-05-09 07:17:59
阅读次数:
242
1 public class T008 { 2 public static void
main(String[] args) { 3 int[] num = { 3, 4, 5, 1, 2 }; 4
System.out.println(min(num, 5...
分类:
编程语言 时间:
2014-05-09 04:12:47
阅读次数:
326
1.循环 1 public class T009 { 2 public static void
main(String[] args){ 3 System.out.println(fibonacci(3)); 4 } 5 public static
long ...
分类:
编程语言 时间:
2014-05-09 03:58:09
阅读次数:
270