Pabl0o0

Untitled

Dec 18th, 2017
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public class Para<A extends Printable, B extends Printable> implements Printable {
  2. private A first;
  3.  
  4. private B second;
  5.  
  6. public Printable getFirst() {
  7. return first;
  8. }
  9.  
  10. public Printable getSecond() {
  11. return second;
  12. }
  13.  
  14. public Para(A first, B second) {
  15. this.first = first;
  16. this.second = second;
  17. }
  18.  
  19. public void print() {
  20. System.out.println("I'm a pair");
  21. }
  22.  
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment