I’m not going to do your homework for you but here are some hints:
- You need to put all your code inside a class
- You need to put the code in the main method. (Search on Google) the method served for an entry point.
- You only need one for loop… Loop through the array, if the value equals 0, return the index number. After the loop just return -1.
solved Class, interface, or enum expected when compiling