3) .java
Let's look at the three options and see why they're right or wrong.
1) .class
This is the file extension that the java compiler used to the compiled output from the compiler. So it's the wrong answer.
2) .h
This is the file extension used for C and C++ header files. So once again, not the right answer.
3) .java
This is the correct extension for a java source file to be compiled.