Java is both a programming language and a platform. In this tutorial the Java Language will be discussed first, followed by the Java Platform. We will try to keep things simple initially, leaving out all the difficult terms that you may or may not be familiar with. Don’t worry, we’ll go over them in great detail as we go along and as the need arises.
What is The Java Language?
The Java programming language is a high-level programming language that is associated with several buzzwords:
Simple Object Oriented Distributed Multithreaded Dynamic Architecture Neutral Portable High performance Robust Secure
It’s okay if you don’t understand what these buzzwords mean. We’ll go over them later in the course. If you want to know the explanation right now, we recommend reading The Java Language Environment, a white paper written by James Gosling and Henry McGilton. However, knowing their meaning is not required if you are just starting to learn Java. Follow along with us as we continue. For the time being, keep in mind that Java is an extremely powerful general-purpose programming language. This means that you can do anything (write any program) in Java. The only limit is your imagination.
All source code (instructions written in human-readable format that can be read and understood by humans but not machines) in the Java programming language is first written in a plain text editor (notepad, notepad++, Sublime Text, Visual Studio Code, and so on). The file is then saved on the computer with a .java extension. The file must be saved as a .java file. There is no other option. Java was designed in this way.
These source files are then compiled (translated into machine-readable instructions) by the javac compiler and saved in the directory as a .class file. For the time being, you don’t need to worry about saving. Using some built-in mechanism, the .class file is automatically saved in the directory after compilation.
A .class file does not contain code that is native to your processor(your processor can not directly execute the instructions); it instead contains bytecodes — the machine language of the Java Virtual Machine (Java VM).
This “Java Virtual Machine” will be explored later. For the time being, all you need to know is that your program runs on the JVM. The java launcher tool then executes your application using an instance (another term we’ll cover later) of the Java Virtual Machine.
This procedure has been purposefully simplified. Just trust us and bear with us a little longer………..
What is The Java Platform?
A platform is simply the hardware or software environment in which a program runs. Microsoft Windows, Linux, Solaris OS, and Mac OS are some of the most popular platforms. Most platforms are a combination of the operating system and the underlying hardware. The Java Platform is a hardware-independent software platform that runs on other hardware platforms.
The Java platform has two components
We’ll go over this in greater detail later. All you need to know now is that the Java Virtual Machine serves as the foundation for the Java platform and is available on a variety of hardware platforms. The JVM is where the Java program runs.
The Java API is a large collection of ready-made software components that provide many useful capabilities. It is grouped into libraries of related classes and interfaces; these libraries are known as packages.
It may be difficult to process all of this information right now. Simply keep these ideas in mind. If we try to elaborate further, we will complicate things unnecessarily and may frustrate you.
We want to let you know ahead of time that you will need to download some software in order to write and run programs.