A compiler is basically itself a program that reads a program written in the high level object oriented programming language and converts it into the machine or computer readable binary codes or language and at the same time, it also reports the errors in the program if any. Java compiler either converts the complete source code in one go or may take multiple passes to do so. However finally, the user gets the compiled code that is prepared to execute. This compiler generated target code file could be run with many alternative inputs, over and over. But you don't need or use the compiler for the sequent reruns. To know in detail about the Java compiler and more about Java, we recommend anyone to take up Java course.
Compiler usually operates on phases and numerous stages which are often classified into 2 phases that are: