A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
understanding String operation
Joined: Oct 08, 2008
Dec 30, 2010 04:46:11
Here is my doubt:
String str = “abc”;
What actually goes behind the scene when JVM sees this statement. How does it recognize “abc” as a
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.
Joined: Oct 13, 2005
Dec 30, 2010 05:59:26
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.
It is sorta covered in the
JavaRanch Style Guide
subject: understanding String operation
Initializing reference variable
what is the difference between String and other reference types?
question regarding strings
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013