Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. System.out.println(1 + 1 + 1 + "1" + 1 + 1 + 1);
  2.  
  3. System.out.println(42 + " is the answer to " + "everything!" + 1 + 1);
  4. System.out.println(42 + " is the answer to " + "everything!" + (1 + 1));
  5.  
  6.  
  7. int x = 1;
  8. x += 3;
  9. System.out.println("The value of x is " + x);
  10.  
  11. int y = 10 % 3;
  12. int z = 15 / 4;
  13. z *= 10;
  14.  
  15. System.out.println(y + " is less than " + z);
  16.  
  17. double a = 17 / 3.0;
  18. double b = 10.0 / 5;
  19.  
  20. System.out.println(a + " is greater than " + b);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement