A programmer creates a person

  • 2
  • Locked
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.
You can't complete this task, because you're not signed in.
Comments (3)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Rajesh R
Level 7 , Toronto, Canada
10 August 2020, 23:45
Hint - the underlying test expects the object to be created as "person"
Level 14 , Richardson, United States
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
Level 15 , Old Town, United States
6 April 2021, 01:57
it's specified under the conditions