Beruflich Dokumente
Kultur Dokumente
Presented By -Sayyan.N.Shaikh
History of Java
Java
was created in 1991 by James Gosling et al. of Sun Microsystems. Initially called Oak, in honour of the tree outside Gosling's window, later its name was changed to Java.
Based on C/C++
Designed for easy Web/Internet applications
Java
The original motivation for Java is to develop a platform independent language that could be embedded in various consumer electronic products like toasters and refrigerators. One of the first projects developed using Java a personal hand-held remote control named Star 7. At about the same time, the World Wide Web and the Internet were gaining popularity. Gosling et. al. realized that Java could be used for Internet programming.
Features of Java
Simple
It inherits some features of C and C ++ no pointers automatic garbage collection rich pre-defined class library
Object oriented
focus on the data (objects) and methods manipulating the data all functions are associated with objects almost all datatypes are objects (files, strings, etc.) potentially better code organization and reuse
Portable
same application runs on all platforms Write once, run/debug anywhere the sizes of the primitive data types are defined and are always the same the libraries define portable interfaces
Secure
simplified network access and usage access restrictions are forced (private, public) No Pointer is used Automatic memory management GC
Dynamic
java is designed to adapt to evolving environment libraries can freely add new methods and instance variables without any effect on their clients interfaces promote flexibility and reusability in code by specifying a set of methods an object can perform, but leaves open how these methods should be implemented can check the class type in runtime
The following figure describes the process of compiling and executing a Java program
Byte code
It is a special machine language that can be understood by the Java Virtual Machine (JVM)
It is independent of any particular computer hardware, so any computer with a Java interpreter can execute the compiled Java program.
The .class files generated by the compiler are not executable binaries. So Java combines compilation and interpretation Instead, it make byte-codes to be executed by the Java Virtual Machine This approach provides platform independence to Java, and greater security
Java Advantages
Portable - Write Once, Run Anywhere! Well Secured. Robust memory management-Automatic garbage collection. Designed for network programming. Multi-threaded (multiple simultaneous tasks) Dynamic & extensible for loading the libraries Classes stored in separate files Loaded only when needed
Questions?
Thank you!