Java. Most of us know it as a programming language or some of us just know it as coffee. The Java I’m talking about is a programming language. And if you don’t know what a programming language is, it is a set of instructions you give to a computer through its language.
You see, computers ONLY understand 1’s and 0’s, but us humans are really bad at coding with just 1’s and 0’s. The coding with 1’s and 0’s is called a Binary system, just a base-two number system. It is also called a machine language or a low-level language, meaning that it is really hard for us to understand, but computers can understand it perfectly. So to be simple, there is also something else called high-level languages, which are languages like Java, Basic, Fortran and many others. Those make it much easier for humans to understand because we now code mostly in words, but then computers can’t. So, people developed something called a compiler, which practically turns what you type like Java, into binary form (1’s and 0’s). That’s the normal high-level language, but Java is a little different.
You see, Java was made to be super flexible, making it so that it could be run on anything, Windows, Mac, or Linux. But for other codes, you couldn’t use some things on computers with different chips. So Java invented something called the Java Virtual Machine, or the JVM. What it does is it turns your source code (the programming stuff that you put in) and it turns it into something called a class file, which is something called an intermediate language. An intermediate language is something which almost all humans can’t understand, and something which computers also cannot understand. Practically just a bunch of letters and numbers jumbled together. Useless right? Well, the thing is, the JVM makes it so that you no longer need a compiler, meaning no more binary/meaning that it is now compatible across all devices. So that’s good, but how does the JVM work if there is no binary form and computers can only understand binary? Well the JVM pretends to make its basic language the class files so that on whatever operating systems you decide to use, all you have to do is download the JVM and it will work as a universal compiler. So yes, that’s most of the stuff about Java.
But wait, there’s one more thing. Java is an object-oriented language, meaning that a program had a lot of classes. It is like this:
MAMMALS is a class of Animals
PRIMATES is a class of Mammals and Animals
HUMANS is a class of Primates, Mammals, and Animals
*Example is taken from “Lecture 4: Programming Methodology: Stanford
So it’s like all squares are rectangles, but not all rectangles are squares. All mammals are animals, but not all animals are mammals. So there is an Association for Computer Machinery (ACM) Hierarchy. First, it’s Applet-Java Applet-Programs. And then there are three different types of programs in Java, Graphics Program, Dialog Program, and Console program. The Graphics program is what makes it that you can see pictures, and display all sorts of images across the screen, graphics. And the Console program makes it so that there is a user interface.