Computer Science, asked by mayanksaha9125, 2 months ago

Write the statement to declare an object of the class Student with the object st .

Answers

Answered by Anonymous
1

As you know, a class (in the Learning the Java Language trail) provides the blueprint for objects (in the Learning the Java Language trail) ; you create an object from a class. Each of the following statements taken from the CreateObjectDemo (in a .java source file) program creates an object and assigns it to a variable:Point originOne = new Point(23, 94);Rectangle rectOne = new Rectangle(originOne, 100, 200);Rectangle rectTwo = new Rectangle(50, 100);The first line creates an object from the Point (in a .java source file) class and the second and third lines each create an object from the Rectangle (in a .java source file) class.

Similar questions