Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package person;
- public class Person {
- protected int id;
- private String name;
- public Person(int id, String name) {
- super();
- this.id = id;
- this.name = name;
- }
- public int getId() {
- return id;
- }
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- protected void show(int d)throws Exception {
- System.out.println(this.name);
- throw(new ArrayIndexOutOfBoundsException("invalid"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement