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. Integer Data type does not include following primitive data type ____________.

long
byte
short
double

2. Which of these coding types is used for data type characters in Java?

ASCII
ISO-LATIN-1
UNICODE
None of the mentioned

3. What is the output of this program?

class Main
{
public static void main(String args[])
	{
		try
		{
			int a, b;
			b = 0;
			a = 5 / b;
			System.out.print("A");
	    }
		catch(ArithmeticException e)
		{
			System.out.print("B");
		}
		finally
		{
			System.out.print("C");
		}
	}
}

A
B
AC
BC

4. Subexpression $ is used for?

End of the entire string
Beginning of the entire string
Matches any single character not in brackets
Matches the end of the line

5. 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

6. What does an interface contain?

Method definition
Method declaration
Method declaration and definition
Method name

7. Which of these classes encapsulate runtime state of an object?

Class
Runtime
System
Cache

8. What is the name of the thread in output of this program?

  
class multithreaded_programing
{
	public static void main(String args[])
	{
		Thread t = Thread.currentThread();
		System.out.println(t.isAlive());
	}
}

1
0
TRUE
FALSE

9. What is JRE?

JRE is a java based GUI application.
JRE is an implementation of the Java Virtual Machine which executes Java programs.
JRE is an application development framework.
None of the above

10. Where is a new object allocated memory?

Young space
JVM
Young or Old space depending on space availability
Old space

Results