Programming - Methods in Java
You Are Here :: Home > JAVA > Methods in Java - General Questions
13. |
A method always returns the result to the __________________________ .
|
A. |
Calling method |
B.
|
call by value |
C.
|
call by reference
|
D.
|
Both B and C
|
|
Answer: Option A
Explanation:
A method always returns the result to the calling method. |
|
14. |
__________________ methods are the methods which do not allow upon the instance variables of a class.
|
A. |
Instance |
B.
|
abstract |
C.
|
Static methods
|
D.
|
Non Static
|
|
Answer: Option C
Explanation:
Static methods are the methods which do not allow upon the instance variables of a class. |
|
15. |
__________________ methods cannot act on instance variables.
|
A. |
Instance |
B.
|
abstract |
C.
|
Static methods
|
D.
|
Non Static
|
|
Answer: Option C
Explanation:
Static methods are the methods which do not allow upon the instance variables of a class.These methods cannot act on instance variables. |
|
16. |
Which key word is used for Static methods?
|
A. |
Instance |
B.
|
abstract |
C.
|
Static
|
D.
|
Non Static
|
|
Answer: Option C
Explanation:
Static is the keyword used for static methods. |
|
17. |
The other name for static variables is ________________________ variable.
|
A. |
Instance |
B.
|
abstract |
C.
|
Class
|
D.
|
Object
|
|
Answer: Option C
Explanation:
Static Variables are also called as Class variables. |
|
18. |
Instance Variables are created in the objects on ____________________ memory.
|
A. |
Heap |
B.
|
Stack |
C.
|
Non Stack
|
D.
|
Temporary
|
|
Answer: Option A
Explanation:
Instance Variable are created in the objects on heap memory. |
|
« prev
next »