Programming - Methods in Java
You Are Here :: Home > JAVA > Methods in Java - General Questions
7. |
____________________ method is from where the execution of the application starts
|
A. |
main() |
B.
|
init() |
C.
|
start()
|
D.
|
stop()
|
|
Answer: Option A
Explanation:
main() method is from where the execution of the application starts |
|
8. |
In Java application, at least one class has at least one _________________ method
|
A. |
main() |
B.
|
init() |
C.
|
start()
|
D.
|
stop()
|
|
Answer: Option A
Explanation:
In Java application, at least one class has at least one main() method |
|
9. |
In Java parameters are always passed by _____________________.
|
A. |
value |
B.
|
reference |
C.
|
both
|
D.
|
none
|
|
Answer: Option A
Explanation:
In Java parameters are always passed by value. |
|
10. |
A ___________________ represents a group of statements that perform a task
|
A. |
method |
B.
|
class |
C.
|
object
|
D.
|
functions
|
|
Answer: Option A
Explanation:
A method represents a group of statements that perform a task. |
|
11. |
Can method never return more than one value?
|
A. |
Yes |
B.
|
No |
C.
|
cant say
|
D.
|
may be
|
|
Answer: Option A
Explanation:
Yes,a method returns only one value.it never returns more than one value. |
|
12. |
The _________________ methods are the methods which act on the instance variables of the class.
|
A. |
Instance |
B.
|
Abstract |
C.
|
Static methods
|
D.
|
Non Static
|
|
Answer: Option A
Explanation:
Instance Methods are those methods which act on the instance variables of the class. |
|
« prev
next »