Alien head

Java Programming Language Quiz - 1

Description: Java Programming Language Quiz - 1
Number of Questions: 7
Created by:
Tags: java

Which one of the following is not a valid Javadoc tag?

  1. @author

  2. {@link}

  3. @serialField

  4. @arg

Answer: 4

Which one of the following statements about an identifier is incorrect?

  1. An identifier can include letters and the first character can be a letter.

  2. An identifier can include digits, but the first character cannot be a digit.

  3. An identifier's length can exceed the length of the current line.

  4. The symbol for PI (3.14159...) is a valid identifier.

Answer: 3

Which one of the following identifiers is not a keyword?

  1. null

  2. transient

  3. assert

  4. const

Answer: 1

Which one of the following primitive types is intended for use with Unicode?

  1. Double precision floating-point (double)

  2. Character (char)

  3. Byte integer (byte)

  4. Boolean (boolean)

Answer: 2

Which one of the following type-oriented statements is incorrect?

  1. User-defined types are also known as reference types.

  2. User-defined types are only defined via classes and interfaces.

  3. An array type is signified by an identifier and one or more pairs of square brackets.

  4. The declaration int[] x; introduces an array type.

Answer: 2

Select a statement that best indicate a situation with low coupling.

  1. The attributes of the class are all private

  2. The class refers to a small number of other objects

  3. The object contains only a small number of variables

  4. The object is referred to using an anonymous variable, not directly

  5. The reference variable is declared for an interface type, not a class. The interface provides a small number of methods

Answer: 5

Applications in a J2EE architecture

  1. must be created via a Java IDE.

  2. can run on different machines, but only with the same Operating System.

  3. are typically based on Servlets, JSPs and Enterprise Java Beans.

  4. need no runtime environment.

Answer: 3
+ View questions