Java Multiple Choice Questions

  1. Which of these is supported by method overriding in Java?
    1. Abstraction
    2. Encapsulation
    3. Polymorphism
    4. None of the mentioned
Answer :
C
Explanation:
Added By : Diwakar

  1. Which of the following is NOT a keyword in Java?
    1. Instanceof
    2. emun
    3. transient
    4. strictfp
Answer :
B
Explanation:
Added By : Suraj


  1. JAR stands for ________.
    1. Java Application Runner
    2. Java Archive Runner
    3. Java Archive
    4. None of these
Answer :
C
Explanation:
Added By : Kritika

  1. Which method is called first by an applet program?
    1. start( )
    2. run( )
    3. init( )
    4. begin( )
Answer :
C
Explanation:
Added By : Sombir

  1. Which of the following differentiates between overloaded functions and overridden functions?
    1. Overloading is a dynamic or runtime binding and overridden is a static or compile time binding.
    2. Overloading is a static or compile time binding and overriding is dynamic or runtime binding.
    3. Redefining a function in a friend class is called overloading, while redefining a function in a derived class is called as overridden function.
    4. Redefining a function in a derived class is called function overloading, while redefining a function in a friend class is called function overriding.
Answer :
B
Explanation:
Added By : Varun

  1. To override a method in Java, we need to define a method in sub class with the
    1. same name, same number of arguments having the same data types as a method in the super class
    2. different name, same number of arguments having the same data type as a method in the super class
    3. same name but different number of arguments as a method in the super class
    4. same name, same number of arguments but different data types as a method in the super class
Answer :
A
Explanation:
Added By : Kiran Kumar


  1. A constructor that is automatically generated in the absence of explicit constructors called?
    1. Default Constructor
    2. Nullary Constructor
    3. Empty Constructor
    4. All the above
Answer :
D
Explanation:
Added By : Akash

  1. Choose best option that describes Constructor.
    1. Have no return type
    2. Use name of the class and have no return type
    3. Use name of the class
    4. None of the above
Answer :
B
Explanation:
Added By : Prashant

Social Sharing
Search