The correct way to declare a variable is String astring = new String(); not String astring = newString();