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.
Joined: Sep 02, 2000
now it compiles, but when i try to run java TapeDeck, I get:
The problem is that notepad is fairly dumb, and it will append .txt to anything that you save if it isn't a .txt extension. in order to make sure that your file has the extension you want, you have to use the quotes.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.