1.

> System.out.println("    ___\n   ('v')\n  ((   ))\n-/-\"---\"--\n");
  // 1234567890123456789012345678901234567890123456789012345678901
    ___
   ('v')
   (( ))
-/-"---"--



 2. "\n\"".length() == 2

 3. 2 (order of operations, + - same priority, associativity, left to right)

 4. -4 (same only with parens forcing a certain order of operations) 

 5. 2

 6. -5

 7. 2

 8. 3

 9. 1.5

10. import java.math.BigDecimal; 

    ...

    BigDecimal a = new BigDecimal("0.1"); 
    BigDecimal b = new BigDecimal("0.2"); 

    BigDecimal c = a.add(b); 

11. BigDecimal d = new BigDecimal("4.35"), 
               e = new BigDecimal("100"); 

    BigDecimal f = d.multiply(e); 

12. false 

13. true 

14. false 

15. 4

16. 3

For 17-20 the value of the expressions is independent of n. 

17. false 

18. false 

19. -1 because n++ - n when n is 3 becomes 3 - 4 which is -1. 

20. true 

21. "12"

22. "33"

23. "33" I don't know why this was in duplicate here?! Sorry. 

Maybe I wanted to ask about (1 + 2) + "3" which would have been the same... 

24. "123"

25. "30"

26. '0' + 3 (which is 51). The correct answer is: the ASCII code of '3'.

27. "32"

28. 1

29. false 

30. true 

31. false 

32. a

33. a

34. true 

35. !a 

36. a

37. a

38. !a 

39. a

40. false

41. true 

42. n == 4

43. n != 2

44. "op"

45. "o"

46. 'o' - 'p' which evaluates to -1 

47. "p" 

48. 4

49. -1 , -3

50. an infinity of 0's one per line; this is an infinite loop

Why? Because i = i++ leaves i unchanged. 

51. b = (true && (n < 10)) || ((n > 10) && ! (n < 10));

so  b = (n < 10) || (n > 10 && n >= 10);

so  b = (n < 10) || (n > 10);

so  b = (n != 10);

52. Recall that a do loop in general looks like this: 

  INIT
  do {
    BODY
    STEP
  } while (COND); 

It can be rewritten with a while as follows:

  INIT
  BODY
  STEP
  while (COND) {
    BODY
    STEP
  } 

So in this case the answer is: 

int count = 0; // INIT
System.out.println( ++ count ); // BODY
// STEP is missing
while (Math.random() < 0.75) { // COND 
  System.out.println( ++ count ); // BODY
  // STEP is missing
}