I would like to understand if Java programs are Interpreted or compiled, and why?
I (think I) know the definitions of compilation and intrepertations:
Compilation - Translates the source code to machine code. Then the machine code can be executed.
Interpreted - Translates the code and runs it at the same time. Translates one line of source code, runs it, translates the next line, runs it, and so on.
Are these definitions correct? If so, are Java programs Interpreted or compiled, and why?