ECLIPSE SETUP


MAIN.JAVA

Currently, the requirement for Java programs is that they be placed inside a file called Main.java.  If you submit your file in any other program, your code will not work.  Note that you cannot use packages either.

 

Note that this requirement can change at any time.  So it is important to check this.

 

ECLIPSE SETUP

 

Having to use the file Main.java for each of the five questions does create a challenge for Eclipse users. 

 

The best solution is to create a different java project for each question – so five projects.  Inside each project, create the file Main.java.  See the image below for the setup.

 

 

Furthermore, you can start each Main.java file with the main function declaration so that you are ready to code when you have read the problem. 

 

 

TO SUBMIT

 

When it is time to submit your code, you have to upload your file.  You can do this by browsing to the folder that contains the Main.java file.

 

Or, you can keep a file called Main.java on your desktop that you copy and paste your code into.  Note that you need to make sure your file is named exactly correct – come computers hide file extensions making this an issue.