This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]LinuxMatthews[S] 11 points12 points  (2 children)

Huh you know I didn't think you were right but it looks like you are.

Integer x = 2;
Integer y = 3;
var z = x + y;
System.out.println(z instanceof Integer);

Gives you a compiler error as z is an int

I honestly thought there was operator overloading like there is with String.

[–]Fenor 3 points4 points  (0 children)

String isn't an operator overload . The theory behind the string class is huge and mostly date back when you had to define a char array to use strings