Java
Java is a simple object-oriented, distributed, interpreted, robust, secure, architecture neutral, portable, high-performance, multi threaded and dynamic language, use to built internal application.
History of Java
History of Java James Gosling, the father of Java, was intent on building a low-cost, hardware-independent software platform using C++. James Gosling initiated the Java language project in June 1991 for use in one of his many set-top box projects.
Interesting facts about Java-
- Java’s old name was OAK (because of the Oak tree growing outside developer’s house).
- Coffee Mug was deployed as Java’s symbol, because the developers of Java drank and loved coffee.
- It was originally developed by Sun Microsystems, but later bought by Oracle.
- First major JDK (Java Development Kit) 1.0 was released on January 21, 1996.
- Android, one of the most famous mobile OS, is based on Java.(Android SDK also uses Java)
- Java has no concept of pointers unlike its predecessors.
- Simple. Java's developers deliberately left out many of the unnecessary features of other high-level programming languages. For example, Java does not support pointer math, implicit type casting, structures or unions, operator overloading, templates, header files, or multiple inheritance.
- Object-oriented. Java uses classes to organize code into logical modules. At runtime, a program creates objects from the classes.
- Statically typed. All objects used in a program must be declared before they are used. This enables the Java compiler to locate and report type conflicts.
- Compiled. Before you can run a program written in the Java language, the program must be compiled by the Java compiler. The compilation results in a "byte-code" file that, while similar to a machine-code file, can be executed under any operating system that has a Java interpreter. This interpreter reads in the byte-code file and translates the byte-code commands into machine-language commands that can be directly executed by the machine that's running the Java program. You could say, then, that Java is both a compiled and interpreted language.
- Multi-threaded. Java programs can contain multiple threads of execution, which enables programs to handle several tasks concurrently. For example, a multi-threaded program can render an image on the screen in one thread while continuing to accept keyboard input from the user in the main thread.
- Garbage collected. Java programs do their own garbage collection, which means that programs are not required to delete objects that they allocate in memory. This relieves programmers of virtually all memory-management problems.
- Robust. Because the Java interpreter checks all system access performed within a program, Java programs cannot crash the system. Instead, when a serious error is discovered, Java programs create an exception. This exception can be captured and managed by the program without any risk of bringing down the system.
- Secure. The Java system not only verifies all memory access but also ensures that no viruses are hitching a ride with a running applet. Because pointers are not supported by the Java language, programs cannot gain access to areas of the system for which they have no authorization.
- Extensible. Java programs support native methods, which are functions written in another language, usually C++. Support for native methods enables programmers to write functions that may execute faster than the equivalent functions written in Java. Native methods are dynamically linked to the Java program; that is, they are associated with the program at runtime. As the Java language is further refined for speed, native methods will probably be unnecessary.
- Well-understood. The Java language is based upon technology that's been developed over many years. For this reason, Java can be quickly and easily understood by anyone with experience with modern programming languages such as C++.
Java Byte Code is the language to which Java source is compiled and the Java Virtual Machine understands. Unlike compiled languages that have to be specifically compiled for each different type of computers, a Java program only needs to be converted to byte code once, after which it can run on any platform for which a Java Virtual Machine exists.
Java Virtual Machine
JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed. JVMs are available for many hardware and software platforms. JVM, JRE and JDK are platform dependent because configuration of each OS differs. But, Java is platform independent. The JVM performs following main tasks:
- Loads code
- Verifies code
- Executes code
- Provides runtime environment
JRE is an acronym for Java Runtime Environment. It is used to provide runtime environment. It is the implementation of JVM. It physically exists. It contains set of libraries + other files that JVM uses at runtime. Implementation of JVMs are also actively released by other companies besides Sun Micro Systems/Oracle .
Post a Comment