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 exception thrown by parseInt() method?

ArithmeticException
ClassNotFoundException
NullPointerException
NumberFormatException

2. Which of these keywords is used by a class to use an interface defined previously?

Import
import
implements
Implements

3. All methods must be implemented of an interface.

TRUE
FALSE
Can be true or false
can not say

4. Which of these are types of multitasking?

Process based
Thread based
Process and Thread based
None of the mentioned

5. Which of the following is the correct way of implementing an interface salary by class manager?

class manager imports salary {}
class manager implements salary {}
class manager extends salary {}
none of the mentioned

6. Which of these class is not a member class of java.io package?

File
StringReader
Writer
String

7. The && and || operators

Compare two boolean values
Compare two numeric values
Combine two boolean values
Combine two numeric values

8. 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");
		}
	}
}

A
B
Compilation Error
Runtime Error

9. JDBC Driver manager loads a database-specific driver in an application to establish a connection with a database.

Yes
No
Can be yes or no
Can not say

10. A __________ loop statement in Java programming language repeatedly executes a target statement as long as a given condition is true.

for
do-while
while
None of the above

Results