Which method sets/changes the value of a data member of a class?
getter method
setter method
default method
none of these
Which of the following is not an access specifier?
Private
void
protected
default
How many primitive data types are there in java
7
8
5
6
From where do object receive their storage.
Stack memory
Heap memory
Hash memory
Queue
Which of the following is used to invoke methods?
New operator
conditional operator
Dot operator
Arithmetic operator
Which of the following is an example of composite datatype?
object
variable
class
method
Which is a method that returns the value of a data member of the class?
Public method
Accessor method
Default method
Which part of the object declaration statement create new object?
declaration
instantiation
initialization
Which of the following members can be accessed only within the same package?
public
private
Which of the following is done by the new operator to instantiate a class?
Allocating memory for a new object
Deallocating memory for a new object
Reallocating memory for a new object
Creating a new object