Carlos rodriguez

Greenhorn
+ Follow
since Apr 14, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Carlos rodriguez

Dear Mr.
I need your help, to understand the following aspect of String in Java.
I dont understand, Why when I write:
String x, y;
x="Mother";
y="Mother";
Java, create a same instance of the String Object.
but, when I write
x=new String("Mother");
y=new String("Mother");
Java create a diferent instance of the String Object.
Thanks for your help
Atentamente
Carlos A Rodriguez C
cajualin@epm.net.co
rcarlos@upb.edu.co
[ April 18, 2004: Message edited by: Ernest Friedman-Hill ]
14 years ago
Dear Mr.
I need your help, to understand the following aspect of String in Java.
I dont understand, Why when I write:

String x, y;

x="Mother";
y="Mother";

Java, create a same instance of the String Object.
but, when I write

x=new String("Mother");
y=new String("Mother");
Java create a diferent instance of the String Object.

Thanks for your help
Atentamente
Carlos A Rodriguez C
cajualin@epm.net.co
rcarlos@upb.edu.co
14 years ago