What is Java?
Java is a high-level programming language primarily based on the concept of object oriented programming and differs in syntax from C and C++. It was designed by 'Green Team' which was led by James Gosling at SunMicrosystem in the year 1995.
In the early 1990's they took about 18 months to develop a language for small devices. They named it "Oak" after the tree which was outside his office, then in 1995 "Hot Java" was developed.
Java is not just a language; it's a platform which provides huge library, a lot of reusable codes and an environment for execution with security and portability across different operating systems (as Java is a platform independent programming language).
Why was Java created?
Earlier, SunMicrosystems wanted to develop some applications for embedded systems, coffee vending machines, microwaves, remotes, washing machines etc. So, they started using C++ for this purpose by extending the C++ compiler to make it platform independent and more reliable.
As C++ had its emphasis on speed not on reliability, while in electronics reliability is more important than speed.
Soon they realised that C++ would not be good enough for this purpose or this would not be sufficient. So, they worked on developing a language which would be easy to understand, architecture neutral, portable, and reliable. This very reason laid the foundation of language we called 'Java'.
Different versions of Java
1.JDK version 1.0:
Released on Jan 23, 1996.
Code named "Oak"
2.JDK version 1.1:
Released on Feb 19, 1997
- JDBC (Java Database Connectivity)
- Inner classes
- Java Beans
- Remote Method Invocation
Released on Dec 8, 1998.
Code named "Playground"
- Swing integrated to core classes
- Addition of collection classes
- Just in Time compiler
Released on May 8, 2000.
Code named "Kestrel"
- Addition of javax.sound package
- JNDI (Java Naming and Directory Interface)
- Jar Indexing
Released on Feb 6, 2002.
Code named "Merlin"
- IPv6 support
- Image I/O API
- XML processing
- JDBC 3.0 API
- Java web start
Released on Sept 30, 2004.
Code named "Tiger"
- Addition of Metadata
- Typesafe Enums
- Autoboxing/ Unboxing
- Static imports
- Addition of scanner class
7.J2SE 6.0 Released on Dec 11, 2006.
Code named "Mustang"
- Pluggable Annotations
- Java compiler API
- JDBC 4.0 API
- Integrated Web Services
- Scripting Language Support
Released on July 28, 2011.
Code named "Dolphin"
- Network protocols including SCTP and Sockets Direct Protocol are supported
- Exceptional Handling is improved
- Compressed 64-bit pointers
- Different APIs for the graphics feature
- Addition of underscore in numeric literals
9. J2SE 8.0
Released on March 18, 2014
Code named "Culture dropped"
- Java types annotation
- Streams and pipelines
- New Time API and Date
- Default methods and functional interface
- Statically linked JNI (Java Native Interface) libraries
Features of Java
- Simple and easy to use: Java is very much similar to C and C++ in syntax, due to which it is easy to learn and simple to write.
- Object oriented Language: Java comprises object oriented programming concepts rather than procedural programming; hence everything is in the form of objects.
- Platform Independent: A Java program written and compiled on one machine can be executed on any other machine in which JVM is installed irrespective of the operating system.
- Robust: A strongly typed java program goes through compile time checking to find bugs in an early stage.
- Architecture Neutral: Java provides an architecture neutral feature by converting a source code into bytecode which can be executed on any system having JVM.
- Security: Java provides security by not supporting the concept of pointers, which holds the address of the data and if the address is not accessible then data cannot be hacked or manipulated.
- High performance: Java is comprised of JIT, Just In Time compiler which provides high performance by storing the function details in the cache memory, which is called multiple times.
- Distributed: Java provides networking facility by providing multiple inbuilt classes that provide network connectivity between multiple systems at a time.
- Multi-threaded: In Java, it is possible for a program to perform multiple tasks simultaneously which results in interactive applications.
- Compiler and Interpreter: Java provides both compiler and interpreter, the compiler converts the source code into bytecode, and JVM (Java Virtual Machine) interprets the bytecode.
Applications of Java
- Web Applications: Java provides multiple facilities like servlets, struts etc. which supports web application development. Multiple numbers of applications have been developed relating health, security, education sectors using java.
- GUI Applications: Java provides various tools for developing GUI like Swing, Abstract Windowing Toolkit (AWT) and JavaFX. Each of these tools offers multiple facilities. For example, Swing provides advanced components like tabbed panel, scroll panes etc.
- Mobile Applications: One of the major use of java is in mobile applications. The most popular operating system for mobiles 'Andriod' is scripted in java.
- Embedded Systems: Almost, all the embedded systems like ATMs, calculators, televisions, SIM cards etc. uses Java technologies for its functioning.