Get Job-ready: Java Course with 45+ Real-time Projects! - Learn Java
Are you eager to test your grasp of Java fundamentals? This interactive quiz is designed specifically for beginners, offering a fun and effective way to assess your understanding of core Java concepts.
Whether you’re just starting your Java journey or brushing up on the basics, this quiz will challenge your knowledge and pinpoint areas for further exploration.
As you answer each multiple-choice question, a timer will keep you on your toes, mimicking the pressure of a real-world coding challenge. Don’t worry, though – the ultimate goal is to learn and improve!
After completing the quiz, you’ll receive immediate feedback on your answers, allowing you to identify strengths and weaknesses. Let’s test your knowledge.
Quiz Summary
0 of 15 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 15 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
-
Question 1 of 15
1. Question
Which of the following is not a use of Java?
CorrectIncorrect -
Question 2 of 15
2. Question
Which part of Java contains all the set of library files and the JVM used files ?
CorrectIncorrect -
Question 3 of 15
3. Question
What will be the output of the program ?
- Class Example {
Public static void main ( String args [ ] )
{
String name = “DataFlair”;
String name2 = “webservices”;
system.out.println(“we are “ + name + “ and we provide “ + name2 );
}
}
CorrectIncorrect -
Question 4 of 15
4. Question
Which of the following is not true about Java virtual machine ?
CorrectIncorrect -
Question 5 of 15
5. Question
Which is the correct way that JVM executes a code ?
CorrectIncorrect -
Question 6 of 15
6. Question
Which framework in Java is used to send output to the console screen ?
CorrectIncorrect -
Question 7 of 15
7. Question
What will be the value of a ?
class CommentLines {
public static void main ( String args [ ] )
{
int a = 6 ;
++a;
/*
a = a + 1;;
*/
++a;
system.out.println(a);
}
}
CorrectIncorrect -
Question 8 of 15
8. Question
Which of the following is a literal in Java ?
CorrectIncorrect -
Question 9 of 15
9. Question
What are the two keywords that are reserved in Java even though they are not in use now ?
CorrectIncorrect -
Question 10 of 15
10. Question
What will be the values of a and b after execution ?
class SwapNumber {
int a,b;
void swapping(int a, int b) {
b = b + a;
a = b – a;
b = b – a;
}
class Function {
public static void main(String args [ ] )
{
SwapNumber obj = new SwapNumbers ();
obj.swapping(99,88);
System.out.printf(a + “,“ + b );
}
}
CorrectIncorrect -
Question 11 of 15
11. Question
What will be the output of the program ?
class SumandProduct {
public static void main ( String args [ ] )
{
int a = 10 , b = 12 , c;
c= a + b ;
system.out.println(c);
c = a * b;
system.out.println(c);
}
}
CorrectIncorrect -
Question 12 of 15
12. Question
What will be the output of this program ?
class Example {
public static void main ( String args [ ] )
{
String a = “Data”;
String b = “Data”;
if(a == b) {
system.out.println(“two String are equal”);
}else {
system.out.println(“Strings are not equal”);
}
}
}
CorrectIncorrect -
Question 13 of 15
13. Question
How many times will DataFlair be printed ?
Class JAVA {
public static void main ( String args [ ] )
{
for( ; ; ) {
system.out.println(“DataFlair”);
}
}
}
CorrectIncorrect -
Question 14 of 15
14. Question
What is the keyword name of the variable that changes its values asynchronously during the execution of the program?
CorrectIncorrect -
Question 15 of 15
15. Question
Where does the output of standalone applications display?
CorrectIncorrect
Summary:
This fun Java quiz is a great way to check how well you’re learning and to remember things better. By answering the choice questions, you’ll find out how much you know about important Java stuff like how to write code, object stuff, and what Java can do. You’ll get answers right away, so you’ll know what to focus on and learn more.
This quiz is just the beginning of your Java journey! There are tons of other resources to help you learn more, like online classes, lessons, and practice problems.
Talking to other programmers online can also help you understand things better and keep you up-to-speed on the latest Java stuff. So why wait? Take the quiz, have some fun, and get started on your awesome Java coding adventure!
