Online Test for Java

  1. int x[] = new int[]{10,20,30};<br><br>Arrays can also be created and initialize as in above statement.
    True
    False


  1. A constructor that is automatically generated in the absence of explicit constructors called?
    Default Constructor
    Nullary Constructor
    Empty Constructor
    All the above

  1. Java technology is both a programming language and a platform.
    True
    False

  1. Interfaces can be instantiated.
    True
    False


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

  1. Java programming is not statically-typed, means all variables should not first be declared before they can be used.
    True
    False

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

Post Your Question
Social Sharing
Search