Welcome to the Ranch!
sharad kalla wrote:i have one doubt i have one class and i compile it, jvm converts it to byte code,
No, the Java compiler converts source code (in a *.java file) to bytecode (in a *.class file), not the JVM. The JVM
executes the bytecode in the *.class file.
sharad kalla wrote:if i run this its fine but if i change something into byte code than complier will give some error,
my doubt is how does complier that given byte code is modified?
How did you modify the bytecode - did you edit the *.class file with a hex editor? What exactly did you do, and why do you want to edit the bytecode directly?
The JVM does a lot of checks; before it executes the code it is checked by the
bytecode verifier to make sure that it doesn't do things it isn't supposed to do.