Java 相关:
Q1. 接口是否可继承接口?抽象类是否可实现接口?抽象类是否可继承实体类?
A: 都可以.
Q2. abstract的method是否可同时是static,是否可同时是native?是否可同时是synchronized?为什么?
A: 都不可以.
Q3. Inner Class 的static,instance,local,anonymous的区别?
A:
Q4. HashMap,LinkedHashMap,TreeMap,ConcurrentHashMap,HashTable 的区别?
A:
Q5. short s1 = 1; s1 = s1 + 1; 有什么错? short s1 = 1; s1 += 1;有什么错?
A: 前错,类型自动提升,需要强转. 后正确,因为+= 内部做了处理.
Q6: int count = 1; count += count++; 输出什么?
A: 2
Q7: float f = 3.4f;double d = 3.4;System.out.println(f == d);输出结果是什么?
A: false
Q8: String a = "xyz";String b = "xyz";String c = new String("xyz");
System.out.println(a == b);System.out.println(a == c);输出什么?
A: true 和 false