Adam Chalkley wrote:. . . the JVM which convers the code into bytecode which then turns it into the native machine code
That is a low‑level implementation detail which you don't need to know about. And how do you know the JVM converts the bytecode into machine code? I hope you haven't read that anywhere, but if you have, please tell us
where, so we know to avoid that source as mistaken. Much of the time the JVM looks on the bytecode as direct instructions and those are interpreted directly by the JVM without being turned into machine code. That is why if you search for “Java buzzwords” some of the results will say it is interpreted, for example
the white paper by Gosling and McGilton when Java® first came out. I don't know why the recent versions of the
Java™ Tutorials omit “interpreted”, but that link is worth reading. It also tells you whether bytecode is turned into machine code.
Careful about spellings of names. Don't declare several variables on the same line. Add some spaces; one space after each comma would make your line 5 much easier to read. That code won't compile because you didn't supply an initial value for
result before trying to print it.