Java Programming Quiz


Play this Java quiz that will help you to excel in Java certification exams, placements etc. This Java programming quiz consist of 10 questions that you need to solve in 10 minutes. We’ve specially designed this quiz so that you can quickly acquaint to the pattern of questions you can be asked in placement drives, certification exams etc. This Java programming test enables you to assess your knowledge of Java programming.

Take the Free Practice Test



Java MCQs

Practice Java MCQ Questions, which will help you to understand Java programming related concepts and also helps you to prepare for placements, technical rounds, interviews, competitive exams etc.

Java Quiz

Try Free Java Quiz, to start a quiz you need to login first, after login you will get start quiz button and then by clicking on that you can start quiz. You will get 10 Minutes to answer all questions.

Java Quiz

1. Which of these is a super class of all exceptional type classes?

String
RuntimeExceptions
Throwable
Cacheable

2. which of the following is true about methods in an interface in java?

An interface can contain only abstract method.
We can define a method in an interface
Private and protected access modifiers can also be used to declare methods in interface
None of the above

3. What is the output of this program?

class Main
{
public static void main(String[] args)
  {
   try
   {
    return;
   }
   finally
   {
    System.out.println( "Finally" );
   }
  }
}

Finally
Compilation fails
The code runs with no output
An exception is thrown at runtime

4. Predict the output of following Java program?

class Main
{
public static void main(String args[]) {
		try {
			throw 10;
		}
		catch(int e) {
			System.out.println("Got the Exception " + e);
		}
	}
}

Got the Exception 10
Got the Exception 0
Compiler Error
None of the above

5. Earlier name of Java Programming language was -

Eclipse
OAK
Netbean
D

6. Array data access using _____.

Operator
Variable
index
Pointer

7. What requires less resources?

Thread
Process
Thread and Process
Neither Thread nor Process

8. What is the valid data type for variable "a" to print "Hello World"?

switch(a)
{
   System.out.println("Hello World");
}

int and float
byte and short
char and long
byte and char

9. How to get prints of shared object memory maps or heap memory maps for a given process?

jmap
jvmmap
memorymap
memorypath

10. Which of these can be returned by the operator &?

Integer
Boolean
Character
Integer or Boolean

Results