Home > Back-end >  Create an object
Create an object

Time:10-19

Student stu=new Student (" age ");
What is the meaning of this age?

CodePudding user response:

Student is a class, the class has a constructor Student (String age), are you here to the age of the double quotation marks, on behalf of the bracket is inside a String variable, which is to the Student of this class constructor passed a String parameter, and the value of this parameter is equal to "age"

CodePudding user response:

Upstairs is
  • Related