Programming - Classes and Objects
You Are Here :: Home > JAVA > Classes and Objects - General Questions
1. |
A_______________ is a collection of fields and methods that operate on that data.
|
A. |
Class |
B.
|
Object |
C.
|
Abstraction
|
D.
|
Data
|
|
Answer: Option A
Explanation:
A Class is a collection of fields and methods that operate on that data. |
|
2. |
The fields(data) are also called the_______________variables.
|
A. |
Class |
B.
|
Instance |
C.
|
Real
|
D.
|
Constant
|
|
Answer: Option B
Explanation:
The fields(data) are also called the Instance variables. |
|
3. |
__________________are declared inside the body of the class.
|
A. |
Methods |
B.
|
Class |
C.
|
Objects
|
D.
|
Entities
|
|
Answer: Option A
Explanation:
Methods are declared inside the body of the class. |
|
4. |
A class is a model for creating _______________________.
|
A. |
Classes |
B.
|
Objects |
C.
|
Entities
|
D.
|
Fields
|
|
Answer: Option B
Explanation:
A class is a model for creating Objects. |
|
5. |
_________________variables are created inside the object.
|
A. |
Class |
B.
|
Object |
C.
|
Explicit
|
D.
|
Instance
|
|
Answer: Option D
Explanation:
Instance variables are created inside the object. |
|
6. |
______________is an operator that creates the object.
|
A. |
new |
B.
|
Minus |
C.
|
Plus
|
D.
|
This
|
|
Answer: Option A
Explanation:
New is an operator that creates the object. |
|
next »