Hi Have a java class with two methods as below.
public class HelloWorld
{
public static void main(String[] args)
{
String a=null;
returnOriginalString(a);
System.out.println(a);
a="Hello";
System.out.println(a);
}
private static void returnOriginalString(String a)
{
a="Hello World";
}
}
when i print the above message i still get String a as null even after changing the string in second method.And one more thing if i update the string in same method it returns the correct value.How can i update the value of a without using any String methods.?