In November 1995, Sun Microsystems introduced a new programming language to the world- Java. Until then the word “Java” could only mean an island in Indonesia or a particular blend of coffee. Though its initial development began as early as 1991, it took some time for the final working version to reach the market. The basic objective behind developing the language was to create software that could be embedded in consumer electronic devices. Efforts were taken to produce a portable, platform in dependable language, and the result of this led to the birth of a new language. James Gosling and a team of other programmers were the pioneers behind this development of Features of Java. It was initially called “Oak” but was later renamed to “Java”. Slowly but gradually it was found that Internet users had similar problems of portability and platform independence and were looking for software that could address these issues. Java language was found to be small, secure and portable. Thus Java, which was initially developed to cater To small-scale problems, was found capable of addressing large-scale problems across the Internet.
FEATURES OF JAVA
The Java Language is
- Object Oriented
- Multithreaded Simple
The designers of Java were trying to develop a language that a programmer could learn quickly. They also wanted the language to be familiar to most programmers, for ease of migration. Hence the Java designers removed a number of complex features that existed in C and C++. Java does not have features such as pointer manipulation, operator overloading etc. Java does not use the ‘go to’ statement, or header filed. Constructs like ‘struct’ and ‘union’ have also been removed from Java.
Platform-independence refers to the ability of the program to migrate from one computer to another without any difficulty. Java is platform independent at the source level as well as at the binary level.
Java is strongly typed language. This means that you need to declare the type for any variable. The java data types are consistent across all the development platforms. Java has its own foundation class libraries. This allows the programmer to write code that can be mobbed from one machine to another, with out having to rewrite it. In short, platform independence at the source level allows the user to move the source code from one system to another, compile the code, and run it clearly on the system.
Platform independence at the binary level allows the user to run the compiled binary file on multiple platforms without recompiling the code.
Java is strictly a typed language. Hence it requires explicit method declaration. Java checks your code at the time of compilation and also at the time of interpretation. Thus it eliminates certain types of programming errors.
Java does not have pointers and pointer arithmetic. It checks all access to arrays and strings at the runtime. It also checks the casts of objects from one type to another at runtime.
In traditional programming environments, the programmer had to manually allocate memory. By the end of the program, the programmer had to explicitly free this memory. Problems arose when the programmer forgot to de allocate the memory. In Java the programmer doesn’t need to bother about memory de allocation. It’s done automatically, as Java provides Garbage collections for unused objects. Java’s exception handling feature simplifies the task of error handling and recovery.
Viruses are a great cause of worry in the world of computers. Prior to the advent of Java, programmers had to first scan files, before downloading and executing them. Often this precaution was no guarantee against viruses. Also there were many malicious programs that programmers need to look out for.
These programs could search the contents of your local file system and retrieve sensitive data.
Java provides a controlled environment for the execution of the program. It never assumes that the code is safe for execution. And since java is more than a programming language, it provides several layers of security control.
In the first layer, the data and methods are encapsulated in the class. They can be accessed only through the interface that the class provides. Java does not allow any pointer arithmetic. Hence it does not allow direct access to the memory. It disallows array overflow, prevents reading memory out of bounds, and provides garbage collection. All these features help minimize safety and portability problems.
In the second layer the compiler ensures that the code is safe and follows the protocols set by Java before compiling the code. The third layer is safety provided by the Interpreter. The verifier thoroughly screens the byte codes to ensure they obey the rules before executing them.
The fourth layer takes care of loading the classes. The class loader ensures that the class doesn’t violate the access restrictions, before loading it to the system.
Java can be used to develop applications that are portable across multiple platforms and operating systems. Java is designed to support network applications.
Java programs use a process called ‘multithreading’ to perform many tasks simultaneously. Java provides the master solution for synchronizing multiple processes. The built in support for threads enables interactive applications on the internet to run simultaneously