Java Keywords

Questions about reserved words and keywords in the Java programming language

8 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

In Java, final keyword gives the same result as ________ declaration in C++.

  1. throw
  2. cout
  3. const
  4. cin
Question 2 Multiple Choice (Single Answer)

In System.out.println(), the keyword out is the _________.

  1. class
  2. object
  3. method
  4. vriable
Question 3 Multiple Choice (Single Answer)

Which of the following is/are not keyword(s)?

  1. Switch
  2. Integer
  3. Default
  4. Boolean
  5. All of the above
Question 4 Multiple Choice (Single Answer)

Which is a reserved keyword in java?

  1. Subclass
  2. Native
  3. Array
  4. None of theses
  5. All of these
Question 5 Multiple Choice (Single Answer)

Which of the following statements is true regarding final keyword in Java?

  1. A final class can be extended by another class.
  2. A final method can be overridden when its class is inherited.
  3. A final variable's value cannot be changed.
  4. The keywords final and finally have the same meaning in Java.
  5. Final class can be abstract in Java.
Question 6 Multiple Choice (Single Answer)

Which of the following is not a reserve word in Java?

  1. Transient
  2. Implements
  3. Include
  4. Instanceof
  5. All of the above
Question 7 Multiple Choice (Single Answer)

Which of the following is a keyword in Java?

  1. Delete
  2. Exit
  3. Main
  4. Continue
  5. Next
Question 8 Multiple Choice (Single Answer)

Which is a reserved word in Java programming language?

  1. Method
  2. Native
  3. Subclasses
  4. Reference
  5. Array