1. 10
  1.  

  2. 1

    Interesting note about the string + operator. Java compiler automatically turns calls to it into StringBuilder’s append calls and doesn’t create any intermediate objects.