You are here: irt.org | BBS | New Help with 2 Lines of Code! [This BBS is closed]
Posted by Metin on August 06, 1998 at 14:38:28:
class test
{
String k = new String ();
public static void main (String args[])
{
k = "Hello World";
System.out.println (k);
}
}
What is wrong when I try to change the value of a global variable
"k". The compiler tells me that I cannot reference member "k"
without an object.
Am I not creating a new object when I say "new String ()"?
Thank You for any suggestions.
Follow-ups:
You are here: irt.org | BBS | New Help with 2 Lines of Code! [This BBS is closed]