placeholder image to represent content

Java (Basics)

Quiz by Yauhen Arnatovich

Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

New Quizalize solo game modes
20 questions
Show answers
  • Q1

    How many instances can be created for an abstract Java class?

    1

    0

    2

    30s
  • Q2

    What is the output of the following Java code?

    Question Image

    5.0

    4.5

    4.0

    4

    60s
  • Q3

    Choose the incorrect Java code statement below.

    char c = 'a';

    char c = 255;

    char c = "b";

    char c = '\n';

    30s
  • Q4

    What is the output of the below Java code?

    Question Image

    A

    66

    65

    67

    60s
  • Q5

    Does the below Java program compile with error?

    Question Image

    Yes

    No

    60s
  • Q6

    What is True about a Java String object?

    A String object represents a string in the UTF-16 format

    All statements are True

    String objects are constant; their values cannot be changed after they are created

    String objects are immutable

    60s
  • Q7

    What is the output of the Java program below?

    Question Image

    true,false

    false,false

    true,true

    false,true

    60s
  • Q8

    What is the output of the Java program below?

    Question Image

    Runtime Error

    Base::show() called

    Derived::show() called

    Compilation Error

    60s
  • Q9

    What is the output of the Java program below?

    Question Image

    Runtime Error

    Same

    Compilation Error

    Not same

    30s
  • Q10

    What is the output of the Java program below?

    Question Image

    2001,1001

    2001,1002

    2002,1002

    2002,1003

    300s
  • Q11

    What is the output of the Java program below?

    Question Image

    10,10

    20,10

    20,20

    10,20

    60s
  • Q12

    What is True about the "final" keyword in Java?

    All statements are True

    When a method of a class is final, it can not be overridden in a subclass

    When a variable is final, it can be assigned value only once

    When a class is made final, it cannot be extended

    60s
  • Q13

    What is the output of the Java program below?

    Question Image

    Compilation Error

    3

    2

    4

    120s
  • Q14

    What is the output of the Java program below?

    Question Image

    1234004321

    4321000112123

    4321001234

    1234001121231234

    300s
  • Q15

    What is the output of the Java program below?

    Question Image

    96

    59

    95

    99

    300s

Teachers give this quiz to your class