Does BlueJ not require a main() method?

3.8k views Asked by At

When I used the BlueJ IDE, I was able to run programs without using a main() method, whereas when I try the same code in NetBeans it says that the program doesn't have a main() method.

1

There are 1 answers

0
Mudassar On

BlueJ is a development environment which is a deliberately smaller and simpler interface than professional environments like NetBeans or Eclipse. This allows beginners to get started more quickly and hence doesnt force you to write the main() instead it does it for you in the background

https://www.cs.utexas.edu/users/scottm/cs307/handouts/BlueJProjectInstructions.html

Where as Netbeans and Eclipse mandate that you type code manually rather than use a drag and drop approach which is there in BlueJ.

Having said that public static void main(String[] arg){...} is the starting point for a standard standalone program.