Skip to content

Instantly share code, notes, and snippets.

@orderr66
Created March 23, 2021 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orderr66/597632d0fe80470a90c12dec276f2438 to your computer and use it in GitHub Desktop.
Save orderr66/597632d0fe80470a90c12dec276f2438 to your computer and use it in GitHub Desktop.
public class Owl {
private String name;
private int age;
public Owl(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.name);
}
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