I need to access the message in a private String, I though it could be done easily by using a reference, however it then forces me to insert a new message that will replace the backwards one.
class Test {
private String s = "This is string s";
String methodS(String a) {
a = s;
return s;
}
}
class name {
public static void main(String args[]) {
Test elen = new Test();
System.out.println(elen.methodS("This is string s in another class."));
}
}