Java Programming Fundamentals Quiz

Test your knowledge of Java programming concepts including operators, methods, inheritance, constructors, exception handling, and object-oriented programming principles.

20 Questions Published

Questions

Question 1 True/False

All methods in an abstract class must be declared abstract

  1. True
  2. False
Question 2 True/False

A catch can have comma separated multiple arguments

  1. True
  2. False
Question 3 True/False

The overriding method cant have a more restrictive access modifier than the method being overridden.

  1. True
  2. False
Question 4 True/False

The method which is marked as final can be overridden.

  1. True
  2. False
Question 5 True/False

The method which is marked as static can not be overridden.

  1. True
  2. False
Question 6 True/False

The access level for overriding method can be less restrictive than the overridden method.

  1. True
  2. False
Question 7 True/False

Overriding method can change the return type regardless of overridden method.

  1. True
  2. False
Question 8 True/False

Argument List of overriding method can be different

  1. True
  2. False
Question 9 True/False

Constructor can be overloaded

  1. True
  2. False
Question 10 True/False

If method is not inherited then it is not possible to override it

  1. True
  2. False
Question 11 True/False

Contrustor can have any return type

  1. True
  2. False
Question 12 True/False

Reference variables are immutable while String objects are not

  1. True
  2. False
Question 13 True/False

equal() method is used to compare the primitive variables

  1. True
  2. False
Question 14 True/False

Below expression is valid While(int x==2)

  1. True
  2. False
Question 15 True/False

The only type that a switch can evaluate is the primitive int

  1. True
  2. False
Question 16 True/False

For any reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true

  1. True
  2. False
Question 17 True/False

Collection and Collections refer to same type of interface

  1. True
  2. False
Question 18 True/False

The + operator in JAVA can't be overloaded.

  1. True
  2. False
Question 19 True/False

Relational operators always result in a integer value.

  1. True
  2. False
Question 20 True/False

Java has six relational operators in that two are also called as equality operators.

  1. True
  2. False