public class ParseDouble { public static void main(String[] args) { String a = "12.34"; String b = "56.78"; System.out.println( a + b ); // a + b = "12.34" + "56.78" = "12.3456.78" // Because + = concatenate when used on strings System.out.println( Double.parseDouble(a) + Double.parseDouble(b) ); // Double.parseDouble(a) + Double.parseDouble(b) // = Double.parseDouble("12.34") + Double.parseDouble("56.78") // = 12.34 + 56.78 = 69.12 // Because + = ADD when used on doubles } }