I have two questions....
1) What does a Java Compiler actually do?
2) Why do we need compilers?
I have two questions....
1) What does a Java Compiler actually do?
2) Why do we need compilers?
The compiler takes a source language like Java, and translates it into a machine executable form. In the case of Java, the compiler transates your Java code into Java bytecode that is then executed by a bytecode engine (the JVM, Java Virtual Machine). It is done this way so that you can write Java code that will run on many different machines (because you can write a JVM for each machine type).
We need compilers because it is hard to write programs in code that a machine can understand, so we use compilers to translate from a language that is human-readable into a language that is machine-executable.
Compilers translate computer programs from a human readable form into a machine readable form.
Compiler is a program which is written to convert the java source code to the Machine understandable language, Compiler are very important in executing the programs.
You can find you answer here http://askville.amazon.com/compiler/AnswerViewer.do?requestId=35215184