Will the following code compile? If no, which lines will not compile? If yes, what is the output of the following code snippets?
4 StringBuilder sb = new StringBuilder("ab");
5 String s = "123";
6 System.out.println(sb);
6 System.out.println(sb);
7 System.out.println(sb + "cd");
8 System.out.println(sb + s);
ab
abcd
abcd
ab123