Which of the following is the way to control access to members of a class from within a java program?
Compiler
Interpreter
Access specifier
none of these
Which of the following is used to invoke methods?
New operator
conditional operator
Dot operator
Arithmetic operator
How many primitive data types are there in java
7
8
5
6
Which access specifier allows the variables or method access only within a class?
Private
Public
Protected
Default
Which of the following type of members can be accessed inside the same package or outside the package if the class is accessible?
private
protected
public
default
Which is the least restrictive access modifier?
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 of the following is a logical group of related classes?
collection
package
interface
Which operator is used to return a reference to an object?
Conditional operator
Assignment operator
Which of the following is an example of composite datatype?
object
variable
class
method