The compiler thinks 10+2 is a numeric expression and will add the two number together.
If you want to create a String with "10" and "2" put an empty String: "" between them:
10 + "" + 2