Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. public class Pair {
  2. int first;
  3. int second;
  4.  
  5. Pair() {
  6. first = 0;
  7. second = 0;
  8. }
  9.  
  10. Pair(int first) {
  11. this.first = first;
  12. }
  13.  
  14. Pair(int first, int second) {
  15. this.first = first;
  16. this.second = second;
  17. }
  18.  
  19. public void set_first(int first) {
  20. this.first = first;
  21. }
  22.  
  23. public void set_second(int second) {
  24. this.second = second;
  25. }
  26.  
  27. public int get_first() {
  28. return first;
  29. }
  30.  
  31. public int get_second() {
  32. return second;
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement