JAVA Quiz
Start
Congratulations - you have completed JAVA Quiz.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
Which class can access all public and protected methods and fields of its super class?
A | Inner class |
B | outer class |
C | sub-class |
D | Super class |
Question 2 |
Method,Field can be accessed from the same class to which they belong.
A | Public |
B | Protected |
C | Default |
D | Private |
Question 3 |
In java, float takes _________ bytes in memory.
A | 8 |
B | 4 |
C | 2 |
D | 16 |
Question 4 |
What will be the output of following piece of code? ? public class operatorExample { public static void main(String args[]) { int x=4; System.out.println(x++); } }
A | output=0 |
B | output=6 |
C | output=5 |
D | output=4 |
Question 5 |
Can variables be used in Java without initialization?
A | NO |
B | YES |
Question 6 |
Can a class in java be inherited from more than one class?
A | YES |
B | NO |
Question 7 |
What will be the output of Round(3.7).
A | 4 |
B | 3.7 |
C | 3 |
D | 0 |
Question 8 |
Does Java supports goto?
A | NO |
B | YES |
Question 9 |
In JAVA can a dead thread be started again?
A | YES |
B | NO |
Question 10 |
Is JDK required on each machine to run a Java program?
A | YES |
B | NO |
Question 11 |
Which tool is required on each machine to run a Java program?
A | JDK |
B | SDK |
C | JRE |
D | CVS |
Question 12 |
Is it possible to define a method in Java class but provide it’s implementation in the code of another language like C?
A | NO |
B | YES |
Question 13 |
Can a variable be local and static at the same time?
A | NO |
B | YES |
Question 14 |
Can we have any other return type than void for main method in java class?
A | YES |
B | NO |
Question 15 |
Which method of the Runnable interface that must be implemented by all threads?
A | Run() |
B | Start() |
C | Sleep() |
D | Wait() |
Question 16 |
Which Keyword is used If a class has multiple constructors defined,it's possible to call a constructor from another constructor’s body?
A | super() |
B | constant() |
C | this() |
Question 17 |
Can we compare string and stringBuffer in Java?
A | YES |
B | NO |
Question 18 |
Can we cast any other type to boolean type with type casting?
A | YES |
B | NO |
Question 19 |
Base class for all exceptions
A | Java.throwable |
B | Java.Lang.throwable |
C | Java.Lang.Exception |
D | Java.Lang.throwables |
Question 20 |
Environment variable that stores the location of bin folder
A | PATH |
B | CLASSPATH |
C | PATHS |
D | BIN |
Once you are finished, click the button below. Any items you have not completed will be marked incorrect. Get Results
There are 20 questions to complete.
← |
List |
→ |
Return
Shaded items are complete.
1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 |
End |
Return
You have completed
questions
question
Your score is
Correct
Wrong
Partial-Credit
You have not finished your quiz. If you leave this page, your progress will be lost.
Correct Answer
You Selected
Not Attempted
Final Score on Quiz
Attempted Questions Correct
Attempted Questions Wrong
Questions Not Attempted
Total Questions on Quiz
Question Details
Results
Date
Score
Hint
Time allowed
minutes
seconds
Time used
Answer Choice(s) Selected
Question Text
All done
Need more practice!
Keep trying!
Not bad!
Good work!
Perfect!