PROGRAMMING:Arrays and objects
Define a person class < br / > < ol > < li > including name < / Li > < li > to complete the nonparametric construction method in the person class, set the name value to none < / Li > < li > in the nonparametric construction method, pass the value to name by the parametric construction method < / Li > < li > and add the set and get methods to the name attribute < / Li > < li ><
public String toString(){
return "name:"+name;
}
two In the main method of the main class, < br / > < ol > < li > create an array of person objects, in which the length of the array is 2 < / Li > < li > and assign a value to the array of person objects. The first element object is a person object without parameters, the second element object is a person object with parameters, and the name is given by the user keyboard < / Li > < li > and circularly outputs the information of the two objects (calling the toString method), An object outputs one line < / Li > < / OL >
###Input format:
Enter name
###Output format:
Output name, one object per line
###Input example:
Here is a set of inputs. For example:
```in
jerry
```
###Output example:
The corresponding output is given here. For example:
```out
name:none
name:jerry
```
answer:If there is no answer, please comment
public String toString(){
return "name:"+name;
}
two In the main method of the main class, < br / > < ol > < li > create an array of person objects, in which the length of the array is 2 < / Li > < li > and assign a value to the array of person objects. The first element object is a person object without parameters, the second element object is a person object with parameters, and the name is given by the user keyboard < / Li > < li > and circularly outputs the information of the two objects (calling the toString method), An object outputs one line < / Li > < / OL >
###Input format:
Enter name
###Output format:
Output name, one object per line
###Input example:
Here is a set of inputs. For example:
```in
jerry
```
###Output example:
The corresponding output is given here. For example:
```out
name:none
name:jerry
```
answer:If there is no answer, please comment