If you call a class public, then the .java file has to have the same name. You need to write player (It should actually be Player) in a file called player.java, and game (or better Game) in the game.java file. Yes, you need two files. Most compilers enforce that requirement.
Andrei Mircescu wrote:a question...if i read all the head first java 2 i am ok for scja ?
No, you're not. Head First Java is awesome, but there's a lot of things you need to know in order to pass the exam not covered in the book. I would recommend both Cameron's books plus practice exam at Sun's website.