Skip to main content

JAVA-1: History and Evolution of Java

History of Programming

The first widespread language was FORTAN but is not clear & lacks ease in understanding programs.

History of Programming

    C Language

  • C language was invented by Dennis Ritchie and resulted from the development process that started with BCPL (developed by Martin Richards). BCPL influenced B language (invented by Ken Thompson), leading to C's development in the 1970s.
  • The de facto standard for C was the one supplied with the UNIX OS. 
  • C was standardized in December 1989, when the ANSI (American National Standards Institute) standard for C was adopted.
  • C language is designed by & for the programmers. C quickly attracted many followers.
  • In the 1960s C championed structured programming.
  • But with an increase in project size, the complexity also exceeds and C cannot handle such complexity.

    C++ Language

  • Object-oriented programming (OOP) was the way to handle structured programming limits.
  • OOP is a programming methodology that helps organize complex programs through the use of inheritance, encapsulation, and polymorphism.
  • C++ was invented by Bjarne Stroustrup in 1979 while working at Bell Laboratories in Murray Hill (New Jersey). 
  • Initially, it was called the "C with classes". In  1983 name was changed to C++ as it extends C by adding object-oriented features.

    Creation of Java

  • Java was developed by James Gosling, Patrick Naughton, Chris Warth, et al. at Sun Microsystems in 1991.
  • Initially, it was called Oak but was later renamed Java in 1995. 
  • The primary motivation for its development was the need for a portable, and platform-independent (i.e., architecture-neutral) language that could be used to create software to be embedded in various consumer electronic devices like ovens, remote controls, etc.
  • Java has inherited the syntax features from C and object-oriented features from C++. Both C++ and Java were designed for different sets of problems.
  • Java enhanced and refined the object-oriented paradigm used by C++, added integrated support for multithreading, and provided a library that simplified Internet access.
  • Java achieved the solution to security & portability issues of the networked programs by generating the bytecode from the compilation of the Java code. 
  • Bytecode is a highly optimized set of instructions designed to be executed by the Java run-time system called Java Virtual Machine (JVM). The original JVM was intended as an interpreter for bytecode.
  • Portability: Translating a Java Program into bytecode makes running a program in a wide variety of environments easier because only the JVM needs to be implemented for each platform. Once the JVM exists the program can run on it. JVM differs from platform to platform but all understand the same Java bytecode. 
  • Security: As the JVM is in control, it can contain the program & prevent it from generating side effects outside the system. 
  • A program is compiled to intermediate form & then interpreted by a virtual machine, making it slower than it would run if compiled to executable code. However, this difference is not too great in Java due to the highly optimized bytecode.
  • Sun Microsystem provides Hotspot technology for this optimization in which the JIT (Just-in-time) compiler [part of JVM] compiles the bytecode into executable code piece by piece. It is not practical to compile an entire Java program into executable code at once because Java performs various run-time checks that can be done only at run-time. Instead, the JIT compiler compiles the code as needed, and the remaining code is simply interpreted.
Java was to Internet programming what C was to system programming.

    Java Applets

  • An applet is a special Java Program designed to be transmitted over the Internet & automatically executed by a Java-compatible web browser.
  • An applet is downloaded on demand without further interaction with the user. If a user clicks a link that contains an applet, the applet will be automatically downloaded & run in the browser. 
  • Applets are intended to be small programs. They are typically used to display data provided by the server, handle user input, or provide simple functions locally rather than on the server.
  •  Applet allows some functionality to be moved from server to client.
  • Broad categories of objects that are transmitted between server & client:
    a) Passive information: it includes reading a mail, and downloading code until it is being executed.
    b) Dynamic(Active Programs): it is a self-executing program like an applet. Such a program is an active agent on the client's computer, yet it is initiated by the server.

    Servlets: Java on the Server Side

  • A servlet is a small program that executes on the server. Just as applets dynamically extend the functionality of a web browser, servlets dynamically extend the functionality of a web server. 
  • Servlets are used to create dynamically generated content that is then served to the client.
  • Because the servlets are compiled into bytecodes first & then executed by the JVM, they are highly portable. 

    Characteristics of Java

  • Secure
  • Portable
  • Simple: Java is quite simple to learn, practice & understand. For a C++ programmer, it is more easy because Java inherits the C/C++ syntax and many of the object-oriented features of C++.
  • Robust: Java completely eliminates the problem of memory management mistakes & mishandled exception conditions. Java has a garbage collection facility that automatically deallocates the memory for unused objects. Java provides the facility of object-oriented exception handling which can handle the run-time exceptions.
  • Multithreaded: Through this a Java program can do many things at a time. The Java run-time system comes with an elegant yet sophisticated solution for multiprocess synchronization that enables us to construct smoothly running interactive systems. Java’s easy-to-use approach to multithreading allows us to think about the specific behavior of your program, not the multitasking subsystem.
  • Architecture-Neutral: Java was designed while keeping in mind the fact that “write once; run anywhere, any time, forever” by making changes in the Java language and JVM.
  • Interpretation & High Performance: Java enables the creation of cross-platform programs by compiling into an intermediate representation called Java bytecode. This code can be executed on any system that implements the Java Virtual Machine. Java bytecode was carefully designed so that it would be easy to translate directly into native machine code for very high performance by using a just-in-time compiler.
  • Distributed: Java is designed for the distributed environment of the Internet because it handles TCP/IP protocols. Accessing a resource using a URL is not much different from accessing a file. Java also supports Remote Method Invocation (RMI). This feature enables a program to invoke methods across a network.
  • Dynamic: Java programs carry with them substantial amounts of run-time type information that is used to verify and resolve accesses to objects at run time. This makes it possible to dynamically link code safely and expediently. This is crucial to the robustness of the Java environment, in which small fragments of bytecode may be dynamically updated on a running system.

Evolution of Java

  • Java 1.0
  • Java 1.1: It added many new library elements, redefined the way events are handled, and reconfigured many features of the 1.0 library. It also deprecated several features originally defined by Java 1.0. Thus, Java 1.1 is both added to and subtracted from attributes of its original specification.
  • Java 2: Sun repackaged the Java product as J2SE (Java 2 Platform Standard Edition), and the version numbers began to be applied to that product. Java 2 added support for several new features, such as Swing and the Collections Framework, and it enhanced the JVM and various programming tools. Java 2 also contained a few deprecations. The most important affected was the Thread class in which the methods suspend( ), resume( ), and stop( ) were deprecated.
  • J2SE 1.3: It was the first major upgrade to the original Java 2 release. For the most part, it added to existing functionality and “tightened up” the development environment. In general, programs written for version 1.2 and those written for version 1.3 are source-code compatible. Although version 1.3 contained a smaller set of changes than the preceding three major releases.
  • J2SE 1.4: It contained several important upgrades, enhancements, and additions. For example, it added the new keyword assert, chained exceptions, and a channel-based I/O subsystem. It also made changes to the Collections Framework and the networking classes. In addition, numerous small changes were made throughout. Despite the significant number of new features, version 1.4 maintained nearly 100 percent source-code compatibility with prior versions.
  • J2SE 5: It expanded the scope, power, and range of the language. To grasp the magnitude of the changes that J2SE 5 made to Java, the list of its major new features includes: generics, annotations, autoboxing & auto-unboxing, enumerations, enhanced for-each style for loop, variable-length arguments (varagrs), static import, formatted I/O, concurrency utilities. Sun uses 1.5 as its internal/developer version number, & 5 as its product version number.
  • Java SE 6: The official product name is Java Platform Standard Edition 6, the 6 is the product version number. The internal/developer version number is 1.6. It adds no major features to the Java language properly, but it does enhance the API libraries, add several new packages, and offer improvements to the run time.

Comments

Most Read