This week's book giveaway is in the
We're giving away four copies of a choice of
"Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac"
and have Joe Kissell on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
Programmer Certification (SCJP/OCPJP)
Joined: Feb 08, 2006
Nov 23, 2006 01:40:00
Which method of
class is called when a String object is being initialised or assigned. This is what i meant:
String s= "abc";
Which method of String class gets invoked to check for for existing value in string pool during this assignment process
SCJP 5.0 77%
Joined: Nov 01, 2006
Nov 23, 2006 01:50:00
I don't think any method is called it all depends on underlying JVM implementations.(esp String pool).
~Sanjeev Singh<br />SCJP 1.5
Cameron Wallace McKenzie
author and cow tipper
Joined: Aug 26, 2006
Nov 23, 2006 02:22:00
This is largely an implementation detail. It's clearly not the single argument contructor that assigns a unique memory space.
I chalk it up to Java vodoo, but who knows.
subject: String initialization
any one tell me?
putting a name in an array
public static void main method
how to convert Byte to the String
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014