Some Windows text editors including Notepad add a three letter ".txt" extension to all the files they save without telling you. Thus you can unexpectedly end up with a file called "HelloWorld.java.txt." This is wrong and will not compile. If your editor has this problem, you should get a better editor. However in the meantime enclose the filename in double quotes in the Save dialog box to make editor save the file with exactly the name you want.