P
Patrick Vanhoof
Hi,
I am pretty new to Java, and am therefor already blocked by a simple program
(code avalaible below). The last line of the program (the println) gives a
syntax error:
'Syntax error on token "(", "Identifier" expected'
Anyone knows why I get this message?
public class Storage {
Storage st = new Storage();
String str = new String("dit is een string");
public static void main(String[] args) {
}
int storage(String s) {
return s.length() * 2;
}
System.out.println(st.storage(str));
}
Thanks in advance,
Patrick
I am pretty new to Java, and am therefor already blocked by a simple program
(code avalaible below). The last line of the program (the println) gives a
syntax error:
'Syntax error on token "(", "Identifier" expected'
Anyone knows why I get this message?
public class Storage {
Storage st = new Storage();
String str = new String("dit is een string");
public static void main(String[] args) {
}
int storage(String s) {
return s.length() * 2;
}
System.out.println(st.storage(str));
}
Thanks in advance,
Patrick