hi! every one,
i've a dbt in strings..
In the following code:
public static void main(
String args[])
{
String s1 = new String("java");
String s2 = new String("java");
s1 = s1.concat("c");
StringConcat(s2);
System.out.println("s1 is : " + s1);
System.out.println("s2 is : " + s2);
}
public static void StringConcat(String str)
{
str = str.concat("c");
}
when i compile and execute this code, i get the answer's as:
s1 is : javac
s2 is :
java what is the reason for this? please clarify my dbt.
thanking u
mary.