If you save a
java source just that source will be compiled.
A Java compile automatically compiles any uncompiled dependencies as well of course, in order to resolve what needs resolving.
Only when you do a rebuild will the entire project (and projects it depends on if needed) get compiled.