please explain that how JVM works when we trying to compile a java class? Help me in understanding the concept?

The JVM has nothing to do with compiling a Java class.
The compiler takes your source code (xxx.java) and converts it into a coded form (xxx.class) that contains a detailed low-level step-by-step set of instructions corresponding to your program.
The JVM then takes that .class file and executes the instructions in it. It also knows how to allocate and manage memory for your objects.
There's loads of info about this on the web. Just Google it.

Done, i will surf that.
Thank u so much JamesCherrill!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.