Advertisement
Guest User

Untitled

a guest
Oct 13th, 2015
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. private static void someTransaction() {
  2. doTransaction1();
  3. doTransaction2();
  4. doTransaction3();
  5. }
  6.  
  7. private static void doTransaction1() {
  8. System.out.println(2.0 - 1.1);
  9. }
  10.  
  11. private static void doTransaction2() {
  12. BigDecimal amount = new BigDecimal(2.0);
  13. BigDecimal debit = new BigDecimal(1.1);
  14. System.out.println(amount.subtract(debit));
  15. }
  16.  
  17. private static void doTransaction3() {
  18. BigDecimal amount = new BigDecimal("2.0");
  19. BigDecimal debit = new BigDecimal("1.1");
  20. System.out.println(amount.subtract(debit));
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement