In bytecode, the first assignment is:
Code:
0: ldc #2; //String abc
2: astore_1
whereas the second is:
3: new #3; //class java/lang/String
6: dup
7: ldc #2; //String abc
9: invokespecial #4; //Method java/lang/String."":(Ljava/lang/String;)V
So the first is in the pool (at position #2) whereas the second will be stored in the heap.
EDIT
Since the CONSTANT_String_info
store the index as U2 (16 bits, unsigned) the pool can contain at max 2**16
= 65535
references. In the case you care here more limits of the JVM.