Posted by cs152 on Wed 19th Sep 23:25
download | new post | report as spam
- import java.util.Scanner;
- public class Person
- {
- private String name;
- private int age;
- {
- name = newName;
- }
- public void setAge(int newAge)
- {
- if (newAge >= 0)
- age = newAge;
- else
- {
- }
- }
- {
- setName(newName);
- setAge(newAge);
- }
- {
- return name;
- }
- public int getAge()
- {
- return age;
- }
- }
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily
.After submitting an amendment, you'll be able to view the differences between the old and new posts easily
