Hi Chandra
You have pretty much got the idea, but I get the feeling the concept of the JVM interpreting the byte code (.class files) is still not completely clear to you. The reason that you need to use a JVM (Java Virtual Machine) that is appropriate to your platform (there is one for Windows, one for Linux, one for OS X, etc.) is that the JVM is acting as the middleman between the byte code and platform-specific OS calls. So, for example, when you have a line of Java code that looks like:
the JVM (interpreter) knows what needs to be done in say, a Windows environment, to make sure that the intent of the instruction is honoured (in this case that means talking to the OS and asking it to print the "Hello World!" text to the console). 'What needs to be done' for Linux is different to what needs to be done on Windows. It is therefore the JVM that is Java's interpreter.
Don't worry too much about JIT compilation for now, this might confuse you (it is not the same as source code compilation, rather it is something that happens whilst a Java program is running [being interpreted], in an attempt to make it run more efficiently). It is something the JVM does for you.
So, if somebody asks you whether Java is a compiled language or an interpreted language, the answer is that it is in fact both. Perhaps it would be useful for you to read a quick explanation of what a traditional interpreted language is, what most people understand by a compiled language, and how Java fits into these definitions:
Compiled Vs Interpreted Examples of interpreted languages: JavaScript, Perl, Python
Examples of compiled languages: C, C++
Hope this helps
Michael