Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

understanding String operation

 
Abhishk Gupta
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49447
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic