Java is an object-oriented programming language that produces software for multiple platforms. When a programmer writes a Java application, the compiled code (known as bytecode) runs on most operating systems (OS), including Windows, Linux and Mac OS. Java derives much of its syntax from the C and C++ programming languages.
We have four editions of Java, each used for building a different type of application:
- Java Standard Edition (SE) - the core Java platform. It contains all of the libraries that every Java developer must learn.
- Java Enterprise Edition (EE) - used for building very large scale, distributed systems. It’s built on top of Java SE and provides additional libraries for building fault-tolerant, distributed, multi-tier software.
- Java Micro Edition (ME) - a subset of Java SE, designed for mobile devices. It also has libraries specific to mobile devices.
- Java Card - used in smart cards.
The Java compiler takes Java code and compiles it down to Java Bytecode which is a cross-platform format. When we run Java applications, Java Virtual Machine (JVM) gets loaded in the memory. It takes our bytecode as the input and translates it to the native code for the underlying operating system. There are various implementations of Java Virtual Machine for almost all operating systems.
The smallest building blocks in Java programs are methods (also called functions in other programming languages). We combine related methods in classes, and related classes in packages. This modularity in Java allows us to break down large programs into smaller building blocks that are easier to understand and re-use.