Advertisement
Guest User

Pair

a guest
Aug 12th, 2012
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. import java.math.BigDecimal;
  2.  
  3. public class Pair {
  4.         private BigDecimal x, y;
  5.  
  6.         public BigDecimal getFst() { return x; }
  7.         public BigDecimal getSnd() { return y; }
  8.  
  9.         public void setFst(BigDecimal a) { x = a; }
  10.         public void setSnd(BigDecimal b) { y = b; }
  11.  
  12.         public String toString() { return (x.toString() + ", " + y.toString()); }
  13.  
  14.         Pair(BigDecimal a, BigDecimal b) { x = a; y = b; }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement