placeholder image to represent content

VnV AT : M3(Java) - Day 1

Quiz by neelimap

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

Correct quiz answers unlock more play!

New Quizalize solo game modes
5 questions
Show answers
  • Q1
    Java programs are compiled into intermediate byte code. What is the advantage of this ?
    enables easy garbage collection
    enables multi threading
    enables portability
    executing the byte code is faster than executing the native code
    30s
  • Q2
    Which of these is NOT valid keyword or reserved word in Java ?
    String
    volatile
    null
    default
    30s
  • Q3
    What will be the output of the following code snippet ? public class Looping { public static void main(String[] args) { int j = 5; for (int i = 0; i< j; i++) { if ( i < j-- ) System.out.print( (i*j) + " "); } } }
    1 4 2
    0 3 2
    0 3 4
    1 2 3
    30s
  • Q4
    A method within a class is only accessible by classes that are defined within the same package as the class of the method. How can this restriction be enforced ?
    Without any accessibility specifiers
    Declare the method with keyword protected
    Declare the method with the keyword public
    Declare the method with keyword private
    30s
  • Q5
    What will be the output of the following code ? public class Test { public static void main(String[] args) { double d = 100.04; float f = d; System.out.println("Float value "+f); } }
    compilation error due to lossy conversion from double to float
    100.0
    100.04
    100
    30s

Teachers give this quiz to your class