Skip to content

Instantly share code, notes, and snippets.

@orderr66
Last active March 23, 2021 16:50
Show Gist options
  • Save orderr66/75473821554cbdddf79a3d6de953b30e to your computer and use it in GitHub Desktop.
Save orderr66/75473821554cbdddf79a3d6de953b30e to your computer and use it in GitHub Desktop.
public class Bird {
private String name;
private int age;
public Bird(String name, int age) {
this.name = name;
this.age = age;
}
public int getAge() {
return age;
}
public String getName() {
return name;
}
public void setAge(int age) {
this.age = age;
}
public void setName(String name) {
this.name = name;
}
public void display() {
System.out.println("Hello There, I am " + this.getName());
}
public void fly() {
System.out.println("I am Flying");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment