Let's create a new person... Actually, that would be better done elsewhere. In our case, we'll just create a template for a person. That is, a Person class. We'll give it fields (name and age). To create new Person objects quickly and confidently, we'll write an initialize(String name, int age) method, where we will initialize these fields.
A programmer creates a person
- 2
Locked
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
Rajesh R
10 August 2020, 23:45
Hint - the underlying test expects the object to be created as "person"
0
Rose
23 June 2020, 17:53
Why when I created a a Person object and put a reference to it like that (Person p1 = new Person();) it was wrong, and when I changed (p1) to (person) it worked?? I'm confused
0
ImDevin
6 April 2021, 01:57
it's specified under the conditions
0