Write the statement to declare an object of the class Student with the object st .
Share
Write the statement to declare an object of the class Student with the object st .
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Verified answer
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.