Created
March 23, 2021 15:50
-
-
Save orderr66/ac4601b2e67c7cbe86782519d83a1ffa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BaldEagle { | |
private String name; | |
private int age; | |
public BaldEagle(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