This site requires JavaScript, please enable it in your browser!
Greenfoot back
DrArgan
DrArgan wrote ...

2016/10/8

Where do I insert the main method ?

DrArgan DrArgan

2016/10/8

#
I have exported my project into a website but I didn't saw anything so I asked my teacher and he said me that a main method is missing where do I have to insert that method (I already know it's public static void main()) But I don't found where to insert. Sorry for my bad English
danpost danpost

2016/10/8

#
DrArgan wrote...
where do I have to insert that method
I really do not think it matters where -- as long as you only have one. The compiler looks for that method to determine the starting point for execution of the code. All other code that executes stems from that method.
DrArgan DrArgan

2016/10/9

#
Thank You but I tryed that with public static void main() { System.out.println("Hello world!") } but It didn't worked what do I have to Insert in the main Method?
danpost danpost

2016/10/9

#
I believe you need to use something like this:
public static void main(String[] args)
Also, you need a semi-colon at the end of the 'println' line.
DrArgan DrArgan

2016/10/10

#
Ok thank you
You need to login to post a reply.