Skip to content

Instantly share code, notes, and snippets.

@anhnguyen1618
Created September 12, 2016 20:40
Show Gist options
  • Save anhnguyen1618/10007538a6a92809e9a39417d9f0dc64 to your computer and use it in GitHub Desktop.
Save anhnguyen1618/10007538a6a92809e9a39417d9f0dc64 to your computer and use it in GitHub Desktop.
public class Person {
private String name;
private int age;
public Person(String nameAtStart) {
this.age = 0;
this.name = nameAtStart;
}
public void printPerson() {
System.out.println(this.name + ", age " + this.age + " years");
}
}
Person Linh=new Person("Linh",19);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment