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 is the output of this program?

  
class increment
{
	public static void main(String args[])
	{
	 int g = 5;
	 System.out.print(++g * 8);
	}
}

44
56
48
40

2. Java was designed by _________________.

Microsoft
Mozilla Corporation
Sun Microsystems
Amazon Inc.

3. paint() is an abstract method defined in AWT.

TRUE
FALSE
Can be true or false
Can not say

4. Which of the following will directly stop the execution of a Thread?

notify()
notifyall()
wait()
exits synchronized code

5. Which of these keywords is used to define packages in Java?

pkg
Pkg
package
Package

6. Java Array can allocate __________.

Dynamic Memory
Static Memory
Both A and B
None of the above

7. What happens when we access the same variable defined in two interfaces implemented by the same class?

Compilation failure
Runtime Exception
The JVM is not able to identify the correct variable
The interfaceName.variableName needs to be defined

8. Which of the following method of Process class can terminate a process?

void kill()
void destroy()
void terminate()
void exit()

9. What is the order of precedence (highest to lowest) of following operators?
1. &
2. ^
3. ?:

1 -> 2 -> 3
2 -> 1 -> 3
3 -> 2 -> 1
2 -> 3 -> 1

10. Which of the following matches the nonword characters?

w
W
C
c

Results