When you run javac and java, two distinct steps happen before you see a single line of output. Understanding compile time versus runtime explains why Java catches many bugs early and why long-running Java programs speed up after warm-up.
More lessons in Complete Core Java