QUIZ: What's New in J2SE 5.0

 

Quizzes Index

The Java 2 Platform, Standard Edition 5.0 (J2SE 5.0)


June 2004

Duke The Java 2 Platform, Standard Edition version 5.0 (J2SE 5.0) has introduced serveral enhancements as well as new language features. Test your knowledge of the J2SE 5.0, Tiger release! Choose the best answer for each question, then click Submit to see how you scored.
  1. The codename for the J2SE 5.0 release is:
     A. Merlin
     B. Mantis
     C. Tiger
     D. Jackalope


  2. The J2SE 5.0 release is targeted at the following major themes:
     A. Ease of development
     B. Monitoring and manageability
     C. Performance and scalability
     D. Desktop
     E. All of the above


  3. Which of the following statement is true about J2SE 5.0?
     A. The new features and their specification APIs are defined in one JSR (JSR-176)
     B. The new features and their specification APIs are defined in multiple JSRs
     C. The new features in J2SE 5.0 are not part of any JSR or the Java Community Process


  4. Generics in J2SE 5.0 are the same as templates in C++.
     A. True
     B. False


  5. The autoboxing/unboxing feature in J2SE 5.0 allows you to:
     A. Eliminate the manual conversion between primitive data types (such as int) and wrapper types (such as Integer)
     B. Eliminate the drudgery of casting
     C. Eliminate the error-proneness of iterators
     D. Avoid qualifying static members with class names


  6. The static import feature, which is implemented as import static, enables you:
     A. To implement interfaces in order to import constants into the present namespace
     B. To import constants from interfaces and other classes without having to subclass them
     C. To use classes without importing them
     D. None of the above


  7. Which of the following is a new keyword in J2SE 5.0?
     A. foreach
     B. in
     C. enum
     D. None of the above


  8. One of the new features in J2SE 5.0 is the formatted output C-like statement printf()
     A. True
     B. False


  9. The enhanced for loop can replace the iterator when traversing through a collection of items. Which of the following statement uses the enhanced for loop?
     A. for (int e in array) { // use e }
     B. foreach (int e in array) { // use e }
     C. for (int e : array) { // use e }
     D. All of the above


  10. Consider the J2SE 5.0 enumeration declaration public enum Season {fall, winter, spring, summer}; what is Season?
     A. A special kind of a class that declares an enum type
     B. A special kind of an interface that declares an enum type
     C. A special kind of a get method for retrieving the enum values


  11. One of the new classes in J2SE 5.0 that can be used for formatted input such as reading and parsing primitive type and strings is:
     A. java.io.Scanner
     B. java.util.Scanner
     C. java.io.InputReader
     D. java.util.FormattedReader


  12. The new feature, metadata, in J2SE 5.0 is:
     A. A replacement for Javadoc comments
     B. A facility that allows developers to annotate their code so that vendors' tools could process such annotations in some fashion and generate boilerplate code (such as stubs) for technologies such as JavaBeans as Web Services
     C. An XML-based Javadoc tag
     D. None of the above



Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve
JavaOne Banner Java 8 banner (182)