Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

understanding String operation  RSS feed

 
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
Marshal
Posts: 54880
155
  • 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.
 
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!