摘要:
泛型类 有一个类型参数声明部分(由尖括号分隔),该类型参数声明部分在方法返回类型之前(在下面例子中的<E>) public static <E extends Comparable<E>> void getMax(E x, E y, E z) { E max = x; if (y.compareTo 阅读全文
摘要:
switch语句支持的类型: byte short int char enum String switch (5) { default: System.out.println(5); case 0: System.out.println(0); case 1: System.out.println( 阅读全文