随笔分类 -  Java

摘要:1. How to create generic array List<Integer>[] array = new List[len]; import java.lang.reflect.Array; ArrayList<Integer>[] array = (ArrayList<Integer> 阅读全文
posted @ 2016-05-29 14:59 新一代的天皇巨星 阅读(150) 评论(0) 推荐(0)
摘要:多说无益,直接看代码。public class MyTest { public static void main(String[] args) { Test t1 = new Test(); System.out.println("------------")... 阅读全文
posted @ 2015-01-03 10:24 新一代的天皇巨星 阅读(646) 评论(0) 推荐(0)
摘要:In C# we have ref and out, while in Java we don't.To do something similar to ref, there are normally 4 ways.Check this out:http://stackoverflow.com/qu... 阅读全文
posted @ 2015-01-02 01:21 新一代的天皇巨星 阅读(206) 评论(0) 推荐(0)
摘要:Normal class(Non-nested class) can only be public, abstract or final.For nested classes, static is allowed.Nested classes(private, public, protected) ... 阅读全文
posted @ 2015-01-02 00:49 新一代的天皇巨星 阅读(251) 评论(0) 推荐(0)