Skip to content

Instantly share code, notes, and snippets.

@khlj
Last active October 11, 2019 03:58
Show Gist options
  • Save khlj/1308a3faa9651674570321f32c040110 to your computer and use it in GitHub Desktop.
Save khlj/1308a3faa9651674570321f32c040110 to your computer and use it in GitHub Desktop.
// Oops.. I submitted the application before working on it... but here it goes with what I can remember..
public class User {
private String username;
private String password;
public User(String username, String password) {
this.username = username;
this.password = password;
}
// getters and setters
}
public class Admin extends User {
public Admin(String username, String password) {
super(username, password);
}
public <T> T someMethod() {
// I don't recall what this method was and if it belonged to User or Admin
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment