Keywords

This lesson discusses different keywords used in Java.

We'll cover the following...

Question # 1

What is the new keyword used for in Java?

The new operator instantiates a class by allocating memory for a new object and returning a reference to that memory. The new operator also invokes the object constructor.

Question # 2

What is the this keyword?

Within an instance method or a constructor, this is a reference to the current ...