String is a special case in Java. It's a class, which I can examine in the source code, but it also has its own infix operator +, which seems to be syntactic sugar for StringBuilder.
For example,
"Hello " + yourName;
could become
new StringBuilder().append("Hello ").append(yourName).toString();
There are no user-defined operators in Java, so where is + specified for String?
Could the same mechanism be used to make additional operators, such as for vectors?
+specified forint?+is recognised by the compiler as well.int i= 2+3will be replaced byint i=5. In case the value of int cannot be determined at compile time, then there are instructions likeiaddwhich are used in place of+