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 keywords is used by a class to use an interface defined previously?

Import
import
implements
Implements

2. What is the output of this program?

  
class comma_operator
{
	public static void main(String args[])
	{
		int sum = 0;
		for(int i = 0, j = 0; i < 5 & j < 5; ++i, j = i + 1)
			sum += i;
			System.out.println(sum);
	}
}

5
6
14
compilation error

3. Which of these is a super class of all errors and exceptions in the Java language?

Catchable
Throwable
RunTimeExceptions
None of the above

4. Which of the following is used to test the operation?

JDBC API
JDBC Driver manager
JDBC Test suite
JDBC-ODBC Bridge Drivers

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

6. Which of the following line of code is suitable to start a thread ?

  
class X implements Runnable
{
	public static void main(String args[])
	{
	/* Missing code? */
	}
	public void run() {}
}

Thread t = new Thread(X);
Thread t = new Thread(X); t.start();
X run = new X(); Thread t = new Thread(run); t.start();
Thread t = new Thread(); x.run();

7. args in an array of String.

TRUE
FALSE
Can be true or false
Can not say

8. Which of the following is used to interpret and execute Java Applet Classes hosted by HTML.

appletviewer
appletwatcher
appletshow
appletscreen

9. Which of the following is method of wrapper Float for converting the value of an object into byte?

Bytevalue()
byte bytevalue()
bytevalue()
Byte Bytevalue()

10. Which of these statements is incorrect?

By multithreading CPU idle time is minimized, and we can take maximum use of it
By multitasking CPU idle time is minimized, and we can take maximum use of it
Two thread in Java can have the same priority
A thread can exist only in two states, running and blocked

Results