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

Checking Password Code

You almost got it. There are some errors though: you’re not iterating over all the chars of the password (i < password.length() – 1 is wrong) you start with a digit count of 1 instead of 0 you make the check that the count of digits is at least 2 as soon as you meet … Read more

tech