Java Classes And Methods

Java Programming : Java Classes And Methods

This page consist of Java Classes and Methods Questions and Answers, Interview Questions. Pdf for Java Classes and Methods Questions is also available here.
1. What is the return type of a method that does not returns any value?
[A] int
[B] float
[C] void
[D] double
Loading...
2. What is the process of defining more than one method in a class differentiated by method signature?
[A] Function overriding
[B] Function overloading
[C] Function doubling
[D] None of the mentioned
Loading...
3. Which of the following is a method having same name as that of it’s class?
[A] finalize
[B] delete
[C] class
[D] constructor
Loading...
4. Which method can be defined only once in a program?
[A] main method
[B] finalize method
[C] static method
[D] private method
Loading...
5. Which of these statement is incorrect?
[A] All object of a class are allotted memory for the all the variables defined in the class.
[B] If a function is defined public it can be accessed by object of other class by inheritance.
[C] main() method must be made public.
[D] All object of a class are allotted memory for the methods defined in the class.
Loading...
6. Which of these class is super class of every class in Java?
[A] String class
[B] Object class
[C] Abstract class
[D] ArrayList class
Loading...
7. Which of these method of Object class can clone an object?
[A] Objectcopy()
[B] copy()
[C] Object clone()
[D] clone()
Loading...
8. Which of these method of Object class is used to obtain class of an object at run time?
[A] get()
[B] void getclass()
[C] Class getclass()
[D] None of the mentioned
Loading...
9. Which of these keywords can be used to prevent inheritance of a class?
[A] super
[B] constant
[C] Class
[D] final
Loading...
10. Which of these keywords cannot be used for a class which has been declared final?
[A] abstract
[B] extends
[C] abstract and extends
[D] None of the mentioned
Loading...

Are these questions helpful for you?



Comments: (Your feedback is valuable to us)

Manimegalai appu 5 months ago Reply

In your program no.15 ,there is no proper function call,there should be a paranthesis.