Java Programming Language Quiz - 1
Test your knowledge of Java programming fundamentals including Javadoc documentation, identifiers and keywords, primitive and reference types, software design principles, and J2EE architecture.
Questions
Question 1 Multiple Choice (Single Answer)
Which one of the following is not a valid Javadoc tag?
- @author
- {@link}
- @serialField
- @arg
Question 2 Multiple Choice (Single Answer)
Which one of the following statements about an identifier is incorrect?
- An identifier can include letters and the first character can be a letter.
- An identifier can include digits, but the first character cannot be a digit.
- An identifier's length can exceed the length of the current line.
- The symbol for PI (3.14159...) is a valid identifier.
Question 3 Multiple Choice (Single Answer)
Which one of the following identifiers is not a keyword?
- null
- transient
- assert
- const
Question 4 Multiple Choice (Single Answer)
Which one of the following primitive types is intended for use with Unicode?
- Double precision floating-point (double)
- Character (char)
- Byte integer (byte)
- Boolean (boolean)
Question 5 Multiple Choice (Single Answer)
Which one of the following type-oriented statements is incorrect?
- User-defined types are also known as reference types.
- User-defined types are only defined via classes and interfaces.
- An array type is signified by an identifier and one or more pairs of square brackets.
- The declaration int[] x; introduces an array type.
Question 6 Multiple Choice (Single Answer)
Select a statement that best indicate a situation with low coupling.
- The attributes of the class are all private
- The class refers to a small number of other objects
- The object contains only a small number of variables
- The object is referred to using an anonymous variable, not directly
- The reference variable is declared for an interface type, not a class. The interface provides a small number of methods
Question 7 Multiple Choice (Single Answer)
Applications in a J2EE architecture
- must be created via a Java IDE.
- can run on different machines, but only with the same Operating System.
- are typically based on Servlets, JSPs and Enterprise Java Beans.
- need no runtime environment.