Site icon DataFlair

Quiz on Java Basics for Beginners

quiz on java basics for beginners

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.

Time limit: 0

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

Quiz complete. Results are being recorded.

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

  1. Not categorized 0%
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  1. Current
  2. Review / Skip
  3. Answered
  4. Correct
  5. Incorrect
  1. Question 1 of 15
    1. Question

    Which of the following is not a use of Java?

    Correct
    Incorrect
  2. Question 2 of 15
    2. Question

    Which part of Java contains all the set of library files and the JVM used files ?

    Correct
    Incorrect
  3. Question 3 of 15
    3. Question

    What will be the output of the program ?

     

    1. Class Example {

    Public static void main ( String args [ ] ) 

    {

    String name = “DataFlair”;

    String name2 = “webservices”;

    system.out.println(“we are “ + name + “ and  we provide “ + name2 );

    }

    }

    Correct
    Incorrect
  4. Question 4 of 15
    4. Question

    Which of the following is not true about Java virtual machine ?

    Correct
    Incorrect
  5. Question 5 of 15
    5. Question

    Which is the correct way that JVM executes a code ?

    Correct
    Incorrect
  6. Question 6 of 15
    6. Question

     Which framework in Java is used to send output to the console screen ?

    Correct
    Incorrect
  7. 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);

    }

    }

    Correct
    Incorrect
  8. Question 8 of 15
    8. Question

    Which of the following is a literal in Java ?

    Correct
    Incorrect
  9. Question 9 of 15
    9. Question

     What are the two keywords that are reserved in Java even though they are not in use now ?

    Correct
    Incorrect
  10. 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 );

    }

    }

    Correct
    Incorrect
  11. 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);

    }

    }

    Correct
    Incorrect
  12. 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”);

    }

    }

    }

    Correct
    Incorrect
  13. 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”);

    }

    }

    }

    Correct
    Incorrect
  14. 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?

    Correct
    Incorrect
  15. Question 15 of 15
    15. Question

    Where does the output of standalone applications display?

    Correct
    Incorrect

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!

Exit mobile version