Online Test for Java

  1. JAR stands for ________.
    Java Application Runner
    Java Archive Runner
    Java Archive
    None of these

  1. To override a method in Java, we need to define a method in sub class with the
    same name, same number of arguments having the same data types as a method in the super class
    different name, same number of arguments having the same data type as a method in the super class
    same name but different number of arguments as a method in the super class
    same name, same number of arguments but different data types as a method in the super class


  1. How many type of Primitive Data Types exist in Java?
    5
    7
    8
    10

  1. Which of these is a super class of all errors and exceptions in the Java language?
    RunTimeExceptions
    Throwable
    Catchable
    None of the above

  1. Enumerations are a special data type in Java that allows for a variable to be set to a predefined variable.
    True
    False


  1. Which of these is supported by method overriding in Java?
    Abstraction
    Encapsulation
    Polymorphism
    None of the mentioned

  1. Which of the following is NOT a keyword in Java?
    Instanceof
    emun
    transient
    strictfp

  1. A .class file contains bytecodes?
    True
    False

  1. Which method is called first by an applet program?
    start( )
    run( )
    init( )
    begin( )

Post Your Question
Social Sharing
Search