I fiddled your post slightly to remove an unwanted
Let me try some guessing about your compiler error.
Have a look at the old Sun style guide; that link shows the structure of a Java® source file. Don't spend more than 5 minutes on that page. You may have comments before your class starts, a package name, and import declarations. Then you have the header for the class, which at the beginner's stage will look like this:-
public class Zoo You may miss out the word public. Now, the tiniest spelling errors before the name of the class, or anything else written which isn't comment, package name or import, or any spelling errors in them, will produce a compiler error
class interface or enum expected at the beginning of the file. If you get such an error from the end of the file, it means something different. You obviously have some sort of spelling error before the name of the class. Examples of such errors are:-
Public class Zoo publicclass Zoo public Class Zoo public class. Zoo Any of those will produce such an error message.