Skip to content

Instantly share code, notes, and snippets.

@OOPUniversity
Created November 15, 2015 16:34
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 OOPUniversity/9a8179b0333bd0293c20 to your computer and use it in GitHub Desktop.
Save OOPUniversity/9a8179b0333bd0293c20 to your computer and use it in GitHub Desktop.
Demonstration code for the blog post 'Inheritance Part 1 - That Class is Super!'
package com.oopuniversity.basics.classes;
/**
* Created by OOPUniversity on 11/15/2015.
*/
public class Person {
private String firstName;
private String lastName;
public Person(String newFirstName, String newLastName) {
firstName = newFirstName;
lastName = newLastName;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String newFirstName) {
firstName = newFirstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String newLastName) {
lastName = newLastName;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment