Online Test for Java

  1. What is the correct signature of the main method?
    public static void main(String[] args)
    static public void main(String[] args)
    public void main(String[] args)
    A and B Both

  1. Variable name can begin with a letter, "$", or "_".
    True
    False


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

  1. Garbage Collection is manual process.
    True
    False

  1. Which is not a valid keyword in java?
    null
    transient
    synchronized
    native

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


  1. Which method of System class is used to copy array?
    copyArray
    arrayCopy
    arraycopy
    arrCopy

  1. How integer literal can expressed binary data?
    int binaryData = b11010;
    int binaryData = bx11010;
    int binaryData = 0b11010;
    int binaryData = xb11010;

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

Post Your Question
Social Sharing
Search