For an object named Point you would declare an object reference variable like this:
Point p1;
The name p1 can be any valid variable name that you want. Note that p1 does not yet refer to an actual object yet, you have just created a reference to one (kind of like a pointer in C). To set p1 to actually refer to an instance of the object Point you could do something like this:
p1 = new Point();
Copyright © 2026 eLLeNow.com All Rights Reserved.