What actually goes behind the scene when JVM sees this statement. How does it recognize “abc” as a String instance and what function of String class are called to act.
There are only 10 types of people in the world: those who understand ternary, those who don't, and those who mistake it for binary.
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32694
4
posted
0
The compiler recognises that as a String; you should compile a little class with that code in, and inspect it with javap -c Foo to see how it works.