Example
public
class
ClassA {
String
s;
String
s2;
public void
methodA {
String s2 = s.substring(0);
}
}
Solution
s.substring(0) willr eturn the string s. Reconsider your use of the substring() method.