Question: I saw [this question](https://stackoverflow.com/questions/2327916/operator-in-java) a few minutes ago, and decided to take a look in the java String class to check if there was some overloading for the `+` operator.

I couldn't find anything, but I know I can do this

```
String ab = "ab";
String cd = "cd";
String both = ab + cd; //both = "abcd"

```

Where's that implemented?

Answer: 
The compiler treats your code as if you had written something like:

```
String both = new StringBuilder().append(ab).append(cd).toString();

```

Edit: Any reference? Well, if I compile and decompile the OP's code, I get this:

```
0:  ldc #2; //String ab
2:  astore_1
3:  ldc #3; //String cd
5:  astore_2
6:  new #4; //class java/lang/StringBuilder
9:  dup
10: invokespecial   #5; //Method java/lang/StringBuilder."<init>":()V
13: aload_1
14: invokevirtual   #6; //Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
17: aload_2
18: invokevirtual   #6; //Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
21: invokevirtual   #7; //Method java/lang/StringBuilder.toString:()Ljava/lang/String;
24: astore_3
25: return

```

So, it's like I said.
It is handled by the compiler.