Online Test for Java

  1. Garbage Collection is manual process.
    True
    False

  1. James Gosling is father of Java?
    True
    False


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

  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

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

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


  1. Constructor overloading is not possible in Java.
    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

Post Your Question
Social Sharing
Search