Java was originally developed at SunMicrosystems in 1991 to provide a platform-independent programming language and operating system for consumer electronics (televisions, VCRs and toasters ).
In the syntax and implementation, Java is very similar to A simplified version of C. ( “Simplified” should be read in the previous sentence as “an improvement”). This is a very solid, distributed, high-performance, object-oriented, multi-threaded language with all the usual features. As such, is based on years of C development, taking the good and bad without .
As it so happened, however, Java will not be built in the market for consumer electronics. Instead it wound in our web browsers .
Java seems to be a perfect fit for the Web. The language itself is very small (as it was built to go inside toasters and alarm clocks with small amounts of memory). So it could be moved quickly through the Internet .
On the other hand, Java is a language that is platform independent. That is, any computer with Java virtualmachine can run a Java program. Programs can be written anywhere and be run anywhere. This is crucial because if a language can not run on any machine, you can not use the Web to be of service each machine, language and environmentimaginable .
Java Platform independence works because it is an interpreted rather than a compiled language . Unlike C or C code, where Java is compiled, it is not platform-specific code compiledinto machine, but platform-independent byte code. This byte code is distributed via the Internet and has been interpreted by a virtual machine (usually installed in a web browser these days) where the platform is running. Maybe a picture would be useful …
Therefore, as a programmer, you need only concern yourself with the generic Java programming language and its applications in compiling bytecode in whatever system that is using. Then you can be sure your bytecode willbe executed properly if your customers are using Mac, PC, Unix boxes or anything else .
Perhaps the best summary of the design goals and achievements of Java comes from Gary Cornell in the introduction of Core Java. In this introduction, Cornell outlines 12 principles of design used in the development of the Java language. For that reason, the appointment of Java White Paper SunSoft. I will double quotes here, but you should not consider your Java library complete without a copy of Core Java Java is simple .
“We wanted to create a system that can be programmed easily without much training esoteric and that today leveraged standard practice … Therefore, even when we realized that C was not appropriate, we have designed as close to Java to C as possible in order to make the system more comprehensible. Java omits many rarely used, poorly understood, confusing features of C which, in our experience, bring more pain than benefits “.
Java is small
“Another aspect of being simple is being small. One of the goals of Java is to allow the construction of software that can operate stand-alone machines in small .”
Java is object-oriented
“In a nutshell, object-oriented design is a technique that is focuses on the design of data (= objects) and interfaces to it … The purpose of orientedfacilities Java are essentially those of C .”
Java is Distributed
“Java has a rich library routines to deal with TCP / IP protocols such as HTTP and FTP. Java applications can open the objects and access over the network via URLs with the same ease as when accessing a local file system. Java is robust “
“Java is designed to write programs that must be reliable in a variety of ways. Java puts great emphasis on early testing of potential problems, later dynamic (runtime) control and elimination of situations that are prone to error .”
Java is safe
“Java is intended to be used in networking / distributed environments. To that end, a lot of emphasis has been placed on security. Java allows the construction of virus-free, without altering the systems .”
Java is architecture neutral
“The Java compiler [generated] bytecode instructions that have nothing to do with a particular architecture . On the other hand, are designed to be easy to interpret in any machine and easily translated into native machine code on the fly .”
Java is portable
“Unlike Cy C, there is no implementation dependents of “aspects of the specifications. [For example], the size of primitive data types are specified, as is the behavior of arithmetic on them “
Java is Interpreted
“The Java interpreter can run Java bytecode directly on any machine to which the interpreter has been ported. [Thus] the development process can be much faster and more exploratory “.
Java is a high performance
“While the performance of bytecode is interpreted usually more than enough, there are situations where higher performance is required. The bytecode can be translated on the fly into machine code for the CPU is running the application is .”
“The benefits of multithreading are better response and interactive real-time behavior. [This is because a program can do more than one thing at a time ]”
Java is Dynamic
“In a number of ways, Java is a language that is more dynamic than C or C. It was designed to adapt to a changing environment … Libraries can freely add new methods and instance variables without any effect on its customers. “