I did my own reasearch on jvm, and i would appreciate it if someone could confirm my answers.
a jvm is is a software that has its own compiler and interpreter.
the compiler translates .java files into .class files (written in bytecode; not sure bytecode is yet) for the interpreter to execute.
a normal program is executed by the computer's CPU. therefore, performance of the program is platform-dependent.
but
java programs are executed by the jvm, and not the computer, so java programs performs the same on different computers.
in other words the jvm assures that the program is executed in the same environment across all platforms.