An operating system is the system software that handles the software and hardware resources and provides services for the computer programs. SO without an operating system, a computer cannot "boot".
Java is a general-purpose computer-programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible.
Java is used to develop mobile apps, web apps, desktop apps, games and much more...