Home > Back-end >  Java for a great god
Java for a great god

Time:09-30

Design a Student class, including name, gender, age, these three fields and corresponding properties, constructors (contain a parameter, a containing two parameters, a three parameters included), a common function print () is used to output information of the Student, in the Main () method, by the new statement three objects and the object is initialized, and then through the object access the print () method to the output of the three students information,

CodePudding user response:

Define a Student class, other all written within the main function is good, such a small Demo, two methods inside a class, call

CodePudding user response:

reference 1st floor chaimhao response:
define a Student class, all of the other write within the main function is good, such a small Demo, two methods inside a class, call to also go

Suggested use: Map collections

CodePudding user response:

Please write good writing tutorials
  • Related