Java is a general-purpose computer programming language designed to produce programs that will run on any computer system.
Slogan of JAVA
“Write once, run anywhere” (WORA)
History of Java
Java is a general-purpose, high-level programming language developed by Sun Microsystems. The Java programming language was developed by a small team of engineers, known as the Green Team, who initiated the language in 1991. The language was originally called OAK, and at the time it was designed for handheld devices and set-top boxes. Oak was unsuccessful and in 1995 Sun changed the name to Java and modified the language to take advantage of the burgeoning World Wide Web.
Now Java is being maintained by Oracle Corporation.
Java Platform Editions
JAVA released to the market in three categories J2SE (JAVA 2 Standard Edition), J2EE (JAVA 2 Enterprise Edition) and J2ME (JAVA 2 Micro/Mobile Edition).
- J2SE is basically used for developing client side applications/programs.
- J2EE is used for developing server side applications/programs.
- J2ME is used for developing mobile applications/programs.
If you exchange the data between client and server programs (J2SE and J2EE), by default JAVA is having on internal support with a protocol called http. J2ME is used for developing mobile applications and lower/system level applications. To develop J2ME applications we must use a protocol called WAP (Wireless Applications Protocol).
Features of Java
1) Object-Oriented:- It is purely OOP Language that is all the Code of the java Language is Written into the classes and Objects So For This feature java is Most Popular Language because it also Supports Code Reusability, Maintainability etc.
2) Compiled and Interpreted:- has both Compiled and Interpreter Feature Program in java is First Compiled and Then it is must to Interpret it.First of all The Program of java is Compiled then after Compilation it creates Bytes Codes rather than Machine Language.
Then After Bytes Codes are Converted into the Machine Language is Converted into the Machine Language with the help of the Interpreter So For Executing the Java Program, First of all, it is necessary to Compile it then it must be Interpreter
3) Platform Independent:- Java Language is Platform Independent means the program of java is Easily transferable because after Compilation of java program bytes code will be created then we have to just transfer the Code of Byte Code to another Computer.
This is not necessary for computers having same Operating System in which the code of the java is Created and Executed After Compilation of the Java Program We easily Convert the Program of the java top another Computer for Execution.
4) Portable: The portability actually comes from architecture-neutrality. In C/C++, source code may run slightly differently on different hardware platforms because of how these platforms implement arithmetic operations. In Java, it has been simplified.
Unlike C/C++, in Java, the size of the primitive data types are machine independent. For example, an int in Java is always a 32-bit integer, and float is always a 32-bit IEEE 754 floating point number. These consistencies make Java programs portable among different platforms such as Windows, Unix, and Mac.
5) Robust and Secure:- The Code of java is Robust and it means it first checks the reliability of the code before Execution When We trying to Convert the Higher data type into the Lower Then it Checks the Demotion of the Code the It Will Warns a User to Not to do this So it is called as Robust.
Secure : When We convert the Code from One Machine to Another the First Check the Code either it is Effected by the Virus or not or it Checks the Safety of the Code if the code contains the Virus then it will never Be Executed that code on to the Machine.
7) Multithreaded and Interactive:- Java uses Multithreaded Techniques For Execution Means Like in other in Structure Languages Code is Divided into the Small Parts Like These Code of java is divided into the Smaller parts those are Executed by java in Sequence and Timing Manner this is Called as Multithreaded In this Program of java is divided into the Small parts those are Executed by Compiler of java itself Java is Called as Interactive because Code of java Supports Also CUI and Also GUI Programs
8) Dynamic and Extensible Code:- Java has Dynamic and Extensible Code Means With the Help of OOPS java Provides Inheritance and With the Help of Inheritance we Reuse the Code that is Pre-defined and Also uses all the built-in Functions of java and Classes
9) Distributed:- Java is a distributed language which means that the program can be designed to run on computer networks. Java provides an extensive library of classes for communicating, using TCP/IP protocols such as HTTP and FTP. This makes creating network connections much easier than in C/C++. You can read and write objects on the remote sites via URL with the same ease that programmers are used to when to read and write data from and to a file. This helps the programmers at remote locations to work together on the same project.
10) Secure: Java was designed with security in mind. As Java is intended to be used in networked/distributor environments so it implements several security mechanisms to protect you against malicious code that might try to invade your file system.
For example – The absence of pointers in Java makes it impossible for applications to gain access to memory locations without proper authorization as memory allocation and referencing model is completely opaque to the programmer and controlled entirely by the underlying run-time platform.
11) Architectural Neutral: One of the key features of Java that makes it different from other programming languages is architectural neutral (or platform independent). This means that the programs written on one platform can run on any other platform without having to rewrite or recompile them. In other words, it follows ‘Write-once-run-anywhere’ approach.
Java programs are compiled into bytecode format which does not depend on any machine architecture but can be easily translated into a specific machine by a Java Virtual Machine (JVM) for that machine. This is a significant advantage when developing applets or applications that are downloaded from the Internet and are needed to run on different systems.
12) Interpreted: Unlike most of the programming languages which are either compiled or interpreted, Java is both compiled and interpreted The Java compiler translates a java source file to bytecodes and the Java interpreter executes the translated bytecodes directly on the system that implements the Java Virtual Machine. These two steps of compilation and interpretation allow extensive code checking and improved security.