Hi,
I am fairly new to java and oo, and this is driving me batty! I have a class with a static method that receives a String, performs some formatting on it and returns the new string, but it returns the passed parameter, not the new string.
Class:
public class StyleUtils {
public static String urlEncode(String myString) {
String s ="new string";
return s;
}
}
Call:
String testString = StyleUtils.urlEncode("myte
st");
The value ending up in testString is "mytest", but it should be "new string"...what am I doing wrong????
Thanks for your help! Anne
Start Free Trial