Originally posted by John Smith:
You probably put these two classes in a file called TapeDeckTestDrive.java or TapeDeck.java. In both cases, the compiler will complain, because neither TapeDeckTestDrive nor TapeDeck is public.
No, the compiler would complain if one of these classes were public and the
java file did not share the same name (or if there were more than one public class in the same file). But the fact that
neither class is public shouldn't matter.
Mine compiled as TapeDeckTestDrive.java.