Programming - Relationship b/w Objects
You Are Here :: Home > JAVA > Relationship b/w Objects - General Questions
1. |
The relationship between Classes and Objects can be seen as the relationship between a _______________
|
A. |
blueprint/model |
B.
|
Print model |
C.
|
Both A and B
|
D.
|
None of these
|
|
Answer: Option A
Explanation:
The relationship between Classes and Objects can be seen as the relationship between a blueprint/model |
|
2. |
State variables are also called ___________ variables
|
A. |
Class |
B.
|
instance |
C.
|
Variable
|
D.
|
Object
|
|
Answer: Option B
Explanation:
State variables are also called instance variables |
|
3. |
The values passed to a method when it is invoked are called _____________ parameters
|
A. |
horizontal |
B.
|
vertical |
C.
|
actual
|
D.
|
None of these
|
|
Answer: Option C
Explanation:
The values passed to a method when it is invoked are called actual parameters |
|
4. |
The name of the method together with the list of its formal parameters is called the _________________ of the method
|
A. |
informal |
B.
|
non-signature |
C.
|
Both A and B
|
D.
|
signature
|
|
Answer: Option D
Explanation:
The name of the method together with the list of its formal parameters is called the signature of the method |
|
5. |
A variable is recognized throughout the block in which it was defined. This is called the _____________ of the variable.
|
A. |
scope |
B.
|
instance |
C.
|
class
|
D.
|
Object
|
|
Answer: Option A
Explanation:
A variable is recognized throughout the block in which it was defined. This is called the scope of the variable. |
|
6. |
_______________ variables are allocated when the method is entered and freed when the method exits.
|
A. |
static |
B.
|
Local |
C.
|
non local
|
D.
|
global
|
|
Answer: Option B
Explanation:
Local variables are allocated when the method is entered and freed when the method exits. |
|
next »