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(1)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
RoseLevel 8 , Richardson
23 June, 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