Online Test for Java


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

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

  1. James Gosling is father of Java?
    True
    False


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

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

  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

Post Your Question
Social Sharing
Search