Pabl0o0

Untitled

Dec 18th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public class Para<A, B>{
  2. private Printable first;
  3.  
  4. private Printable second;
  5.  
  6. public Printable getFirst() {
  7. return first;
  8. }
  9.  
  10. public Printable getSecond() {
  11. return second;
  12. }
  13.  
  14. public Para(Printable first, Printable 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.  
  25.  
  26.  
  27. /*extends Pair<Printable, Printable> {
  28. public Para(Printable first, Printable second) {
  29. super(first, second);
  30. }
  31.  
  32. public void print() {
  33. System.out.println("I'm a pair");
  34. }
  35. */
  36. }
Advertisement
Add Comment
Please, Sign In to add comment