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. What will be the output of the program?

  
class mainclass {
    public static void main(String args[])
    {
      boolean var1 = true;
      boolean var2 = false;
      if (var1)
         System.out.println(var1);
      else
         System.out.println(var2);
    } 
}

0
1
TRUE
FALSE

2. Which of these is not a correct statement?

Every class containing abstract method must be declared abstract
Abstract class defines only the structure of the class not its implementation
Abstract class can be initiated by new operator
Abstract class can be inherited

3. Which of these methods is used to check for infinitely large and small values?

isInfinite()
Isinfinite()
isNaN()
IsNaN()

4. Which of these access specifiers can be used for an interface?

Public
private
Protected
All of the mentioned

5. An applet is a Java class that extends the?

java.Applet class
java class
Applet class
java.applet.Applet class

6. Which of these is not abstract?

Thread
AbstractList
List
None of the Mentioned

7. Sun Microsystems released the first public implementation as Java 1.0 in?

1994
1995
1996
1997

8. Which of the following is an incorrect statement about packages?

Interfaces are specified public if they are to be accessed by any code in the program
Interfaces specifies what class must do but not how it does
All variables in interface are implicitly final and static
All variables are static and methods are public if interface is defined pubic

9. What is the output of this program?

  		 
class Relational_operator
{
	public static void main(String args[])
	{
		int var1 = 5;
		int var2 = 6;
		System.out.print(var1 > var2);
	}
}
	

1
0
TRUE
FALSE

10. The class whose properties are inherited is known as superclass.

TRUE
FALSE
Can be true or false
Can not say

Results