Online Test for Java

  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. How many type of Primitive Data Types exist in Java?
    5
    7
    8
    10

  1. Constructor overloading is not possible in Java.
    True
    False

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


  1. In an instance method or a constructor, "this" is a reference to the current object.
    True
    False

  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. All binary operators except for the assignment operators are evaluated from Left to Right
    True
    False

Post Your Question
Social Sharing
Search