Today in this post we are going to see java overview.
Java was developed by James Gosling at Sun Microsystems Inc. and released in 1995 as core component of Sun Microsystems.
Initially it was named as Oak. Because there was an Oak tree outside James Gosling office. Later it was named Green, Java coffee and finally to Java.
It is one of the widely used computer language and it’s latest release is Java SE 8.
Due to its vast popularity and diverse configuration it has been built to suit different platforms like J2EE for Enterprise Applications, J2ME for Mobile Applications.
- dynamic. It’s an object oriented programming language.
- architecture-neutral. Because applications written java are convenient across many platforms.
- simple, fast, reliable, secure, portable and robust.
- enables high performance with the use of Just-In-Time compilers.
- called platform. Since it has its own Java Runtime Environment(JRE) and Application Programming Interface(API).
- With multithreaded feature users can interact multiple graphical applications that have high performance simultaneously. Since java supports multithreading.
- adaptable to changing environment.
- secure. JRE has built-in protection against virus.
So, what does it mean to be a high-level programming language??
Java code is WORA, “Write Once Run Anywhere”. This means, java code that runs on one platform do not need recompilation on another platform.
This means that the java source code is written in plain text or human readable format.
Java has a set of rules on how it should be written and this is known as syntax.
Java can be extended easily since it is based on Object model and everything is an Object.
Also read – preface to java virtual machine and architecture
As mentioned before, part of simplicity comes from the fact that it’s a high-level programming language which makes easy to read and understand.
There are also a lot of predefined libraries in java that can be used. This allows developers to quickly write and leverage this large library.
For example, these libraries allow you to do fairly common tasks like manipulation. So, we do not have to worry about the complexities of manipulation.
Some of the other benefits that java has over other languages such as C language is that developers don’t have to worry about memory management.
Also read – java garbage collection
Anything you create in your code will take up memory and with java you don’t have to manually allocate memory yourself.
Java automatically reserve amount of memory for application and also automatically get rid of unused memory thanks to its built-in automatic garbage collector.
Code written on one machine is guaranteed to work on any other machine that can run java. This allows developer to focus on code. Let’s understand it in detail,
Java files are saved with dot java(.java) extension. These files are then compiled to .class files by “javac” compiler.
This .class file do not contain code. It is not compiled to platform specific machine, rather into platform independent bytecode.
Also read – class and objects in java
This file actually contains byte code which you can think of as a language that only the JVM can understand. Or in other words machine language of JVM.
Then instance of JVM java launcher tool runs application. This .class files are capable of running on MS Windows or Mac OS.
Because JVM is available on different OS. Then byte code is distributed over the web and interpreted by Java Virtual Machine on platform it is being run on.
Also read – variables in java
You can think of java compiler as a translator between java code and JVM and JVM as the translator between compiled code and machine.
This provides great flexibility for developers because if code compiles and runs on one machine it will compile and run on any other machine.
Bytecode is translated on the fly to native machine and is not stored anywhere.
Java is an object oriented programming language. This is usually called as OOP for short.
Also read – java features
In OOP we put related state and behavior into entities known as objects. This is very similar to real world where you can think of things like motorcycle or car as objects and they have states like engine on and engine off and behavior like moving and parking.
These objects can also communicate with each other. This allows objects to interact with each other and leverage each other related functions that’s unique to that class.
Types of java application
- Web Application
- Enterprise Application
- Mobile Application
- Standalone Application
- Desktop applications
- Web applications
- Widely in android mobile
- Adobe Acrobat
Here are versions of java,
|JDK 1.0||January 1996|
|JDK 1.1||February 1997|
|J2SE 1.2||December 1998|
|J2SE 1.3||May 2000|
|J2SE 1.4||February 2002|
|J2SE 5.0||September 2004|
|JDK 6||December 2006|
|JDK 7||July 2011|
|JDK 8||March 2014|
|JDK 9||September, 21st 2017|
|JDK 10||March, 20th 2018|
|JDK 11||September, 25th 2018|
|JDK 12||March, 19th 2019|
|JDK 13||September, 10th 2019|