Introduction of Java
What is Java?
Java is a programmig language and a platform. Java is a high level, robust, object-oriented and secure programming laguage.
Java was developed by Sun Microsystems(which is now the subsidiary of Oracle) in the year 1995, by James Gosling
Platform: Any hardware or software environment in which a program runs, is known as aplatform. Since, Java has a runtime environment (JRE) and API, it is called Platform.
Features of Java
Simple:
Java is very easy to learn, and its syntax is simple, clean and easy to understand. According to Sun Microsystem, Java language is simple programming language because:
•Java syntax is based on C++(so easier for programmers to learn it after C++).
•Java has removed many complicated and rarely-used features, for example: explicit pointers, operator overloading etc.
•There is no need to remove Unreffered objects because there is an Automatic Garbage Collection in java.
Object-oriented:
Java is object-oriented programming language. Everything in Java is an object. Object-oriented means we organized our software as a cobination of different types of objects that incorporate both data and behaviour.
Platform Independents:
Java is platform independent because it is different from other languages like C, C++, etc. which are compiled into platform specific machines while Java is a 'write once, run anywhere' language. A platform is the hardware or software environment in which a program run.
Secured:
Java is best known for it's security. With java, we can develop virus-free systems. Java is secures because:
• No explicit pointer
• Java Programs run inside a virtual machine sandbox.
Robust:
The English meaning of Robust is strong. Java is robust because:
• It uses strong memory management.
• There is a lack of pointers that avoids security problems.
• Java provides automatic garbage collection which runs on the Java Virtual Machine to get rid of object which are not being used by a java application anymore.
Architecture-natural:
Java is architecture natural because there are no implementation dependent features, for example, the size of primitive types is fixed.
Portable:
Java is portable because it facilitates you to carry the Java bytecode to any platform. It doesn't require any implementation.
High-performance:
Java is faster than other traditional interpreted programming languages because Java bytecode is "close" to native code.
Distributed:
Java is distributed because it facilitates users to create distributed applications in Java.
Multi-threaded:
A thread is like a separate program, executing concurrently. We can write Java programs that deal with many tasks at once by defining multiple threads.
Dynamic:
Java is a dynamic language. It supports the dynamic loading of classes. It means classes are loaded on demand. It also supports functions from its native languages, i.e., C and C++.