Java is a programming language created to be able to work on different types of processors.
Java code, once compiled, can be carried without modification on any machine, and executed. This is due to the fact that the code is executed on a hypothetical or virtual machine, the Java Virtual Machine, which is in charge of interpreting the code and converting it to the particular code of the CPU that is being used.
When you program with Java, a set of already implemented classes is available beforehand. These classes are part of the Java language itself.