javac itself doesn't do any incremental compilation and will happily compile over your .class each time (though you can tell it not to; see http://stackoverflow.com/q/8271282)
Build tools like Maven and Gradle, as well as IDEs' internal build tools, will be smart and compile only the changed files.