Java Error: Invalid top level statement

After quick searching around I assume you’re using DrJava and its Interactions Pane.

You don’t need those parentheses in the run command. Try run Main customer.dat smartphone.dat instead.

That will run the main method of class Main with arguments customer.dat and smartphone.dat

Source

2 thoughts on “Java Error: Invalid top level statement”

  1. whoah this blog is wonderful i really like reading your articles. Keep up the great paintings! You realize, a lot of people are hunting round for this info, you could help them greatly.

    Reply

Leave a Comment