File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes understanding String operation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "understanding String operation" Watch "understanding String operation" New topic

understanding String operation

Abhishk Gupta

Joined: Oct 08, 2008
Posts: 22
Here is my doubt:

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

Joined: Oct 13, 2005
Posts: 46388
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.
I agree. Here's the link:
subject: understanding String operation
It's not a secret anymore!