Step 1: Understanding object creation in Java.
In Java programming, objects are created from classes. A class provides the blueprint, but the actual memory allocation and creation of an object occurs when a special operator is used.
Step 2: Role of the new operator.
The new operator is used to create objects in Java. When this operator is used, it performs the following actions:
1. Allocates memory for the object in the heap.
2. Initializes the object by calling the class constructor.
3. Returns a reference to the newly created object.
For example:
Student s = new Student();
Here, the new operator creates an object of the Student class and returns its reference, which is stored in variable s.
Step 3: Evaluation of options.
(A) dot (.): Incorrect. This operator is used to access members of an object.
(B) new: Correct. It creates an object and returns its reference.
(C) colon (:): Incorrect. This operator is not used for object creation in Java.
(D) assignment (=): Incorrect. This operator assigns values but does not create objects.
Step 4: Conclusion.
Thus, the operator used in Java to create an object and return its reference is the new operator.
Final Answer: new