Online Test for Java

  1. Which keyword is used to inherit class?
    inherit
    extends
    inheritance
    extend


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

  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. A constructor that is automatically generated in the absence of explicit constructors called?
    Default Constructor
    Nullary Constructor
    Empty Constructor
    All the above

  1. The JRE deletes objects when it determines that they are no longer being used. This process is called Garbage Collection.
    True
    False


  1. The Java programming language is a ________?
    Machine Level Language
    High Level Language
    Assembly Level Language
    None of the above

  1. Which is not a valid comment style in Java
    /* comment */
    /* comment
    /** comment */
    // comment

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

Post Your Question
Social Sharing
Search