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
Which is a method that returns the value of a data member of the class?
Public method
Accessor method
Default method
none of these
Which of the following is used to invoke methods?
New operator
conditional operator
Dot operator
Arithmetic operator
What is the class containing main method termed as?
appplication
package
interface
polymorphism
Which operator is used to return a reference to an object?
Conditional operator
Assignment operator
Which of the following can be a constructor's name?
Object name
Method name
Variable name
Class name
How many primitive data types are there in java
7
8
5
6
Which method sets/changes the value of a data member of a class?
getter method
setter method
default method
Which of the following is the way to control access to members of a class from within a java program?
Compiler
Interpreter
Access specifier
Which of the following members can be accessed only within the same package?
default
protected
public
private