Java and its features
Java is both a programming language and a platform.The program is written in a simple file with .java extension.Then compiler called ‘javac’ compiles those files into .class files which are nothing but the bytecodes that will be converted to the machine language by java virtual machine(JVM).Then java launcher tool runs the application with the instance of JVM.
Platform: It can be any hardware or software environment where a program can run.We have seen the program code is converted to bytecodes.As other operating systems have their own JVM, so their JVM will be used to convert the bytecode to machine language which makes it platform independent language.The same class file can run on different operating systems like Microsoft Windows, the Solaris™ Operating System (Solaris OS), Linux, or Mac OS.
The java platform has 2 components.
- Java virtual machine
- Java Application Programming interface(API)
JVM, we have already seen the usage of it (convert bytecode to machine language and helps in execution os the program) and API is nothing but the ready-made software components grouped into libraries of related classes and interfaces, known as packages. (We will see about classes,interfaces and packages in next coming sessions).
Interesting history of java:
In early 90s, a group of engineer at Sun microsystems, known as Green Team Led by James Gosling, started a revolutionary work that was to develop a language to support digital cable television industry.But the concept was too advanced for them at that time. It was best suited internet stuff, which had just started to take off.In 1995, netscape has incorporated java.
Firstly, the language was given a name ‘Greentalk’ by James Gosling and file extension was .gt. Later, it was renamed as Oak( Oak is a national trees of many countries like U.S.A. ,Germany, France etc.)
In 1995, Oak was renamed as ‘Java’, because Oak was a trademark of Oak Technologies.
Why name java?
As Oak was not supposed to be used. All the team member known as Live Oak Group, gathered to discuss a new name. As a result, 10 names were suggested and submitted to legal department. Out of 10 names, 3 were declared clean which were Java,DNA and Silk.It came down to silk or java and finally, Java won out.
Java is an island of Indonesia where first coffee was produced (called java coffee).
In 1995, Time magazine has announced java as one of the 10 best products of 1995.
Java is an high-level language which is highly secured, robust and object-oriented as well.
It can be categorized by all the following buzzwords:
- Object Oriented
- Architecture neutral
- High performance
Advantages or good points about java:
- Platform Independent: One program can run on many platforms like windows,Unix,Mac etc.
- Programs can be developed more quickly: Java programming is comparatively easier than other programming like C++, hence code can be developed faster.
- Distributed software more easily: Application can be launched by single click using Java Web Start software. Update is easily installed if available.
- Write once,Run anywhere: Because code is converted to bytecodes, so they can run on any java platforms.