Table of Contents
What is Java?
Java is an object-oriented programming language created by James Gosling in 1991 and released by Sun Microsystems in 1995. Java was developed with the promise of “writing (code) once, and running it anywhere” (WORA). This means you can develop Java code in any system, and run it in any Java-enabled system without making changes to the code.
But… How is it possible to do that? Java uses a Java Virtual Machine (JVM) to run the code. Having said that, the only requirement needed is to have JVM as part of any system where the Java code will run. If you are wondering why Java was a big deal back then, and still nowadays, it is because prior to its existence, other programming languages, such as C, required changes so it could be understood by different hardware.
Did you know Java had other names?
When James Gosling started working on Java, the project was initially called “Greentalk”, explaining why the initial file extensions ended in .gt. The language in itself was initially called “Oak”. The reason they gave this name didn’t have anything to do with the language. Instead, they gave this name after an oak tree that stood outside Gosling’s office. However, they had to change the name as Oak had a trademark by Oak Technologies. After the following talks, it was decided to name the language Java.
- HTML gives the structure of the website.
- CSS allows you to style a website.
Without any doubt, the major cause of confusion between these two programming languages is the Java prefix. The funny part is there are not many similarities when it comes to the two languages. However, there is an explanation as to why their names are similar.
What Are The Differences?
|Statically Typed.||Dynamically Typed.|
|Class-based object-oriented programming language.||Prototype-based inheritance programming language. It can still be used as an object-oriented language.|
|Widely used for enterprise applications.||Widely used for web applications and hybrid mobile applications.|
|Supports multithreading.||Doesn’t support multithreading.|
|Can be executed on a virtual machine. Java can be run in the browser using Java Applets, but this practice is almost obsolete.||Can be executed in the browser and on a virtual machine.|
|Relatively easy to learn as the community, online resources, and documentation are extensive.||Relatively easy to learn as the community, online resources, and documentation are extensive.|
Primarily, Java gives you the possibility to develop:
- Android applications
- Web applications
- Desktop or Standalone applications
- Enterprise applications
- Game applications