C
column
Hello,
Is it possible return value to function parameter in JAVA?
public static boolean a(String s)
{
s= new String ("aaa");
return true;
}
public static void main(String[] args)
{
String s = new String(String "bbb");
boolean d= a(s);
System.out.print(s);
}
It prints bbb, but I need aaa. What is solution?
Is it possible return value to function parameter in JAVA?
public static boolean a(String s)
{
s= new String ("aaa");
return true;
}
public static void main(String[] args)
{
String s = new String(String "bbb");
boolean d= a(s);
System.out.print(s);
}
It prints bbb, but I need aaa. What is solution?