请写出一段java代码.要求:
1这个代码在jdk1.5下能编译通过
2代码只要是在jdk1.5的版本,无论外界是何种情况运行结果都一样
3代码只要是在jdk1.6的版本,无论外界是何种情况运行结果都一样
4在jdk1.5的状态下和在jdk1.6的状态下运行结果不一样
1这个代码在jdk1.5下能编译通过
2代码只要是在jdk1.5的版本,无论外界是何种情况运行结果都一样
3代码只要是在jdk1.6的版本,无论外界是何种情况运行结果都一样
4在jdk1.5的状态下和在jdk1.6的状态下运行结果不一样
try {
Class.forName("java.awt.SystemTray");
System.out.println("1.6");
} catch (ClassNotFoundException ex) {
System.out.println("1.5");
}
2代码只要是在jdk1.5的版本,无论外界是何种情况运行结果都一样
3代码只要是在jdk1.6的版本,无论外界是何种情况运行结果都一样
LinkedList - retrofitted to implement the Deque interface.
http://download.oracle.com/javase/6/docs/technotes/guides/collections/changes6.htmlhttp://www.oracle.com/technetwork/java/javase/adoptionguide-137484.html
http://www.oracle.com/technetwork/java/javase/features-141434.html
Deque - a double ended queue, supporting element insertion and removal at both ends. Extends the Queue interface.