Course Feedback Survey. Certificate Final Exam. Saylor Direct Credit. About Saylor Academy. Credit University Partners. Back to '2. Log in or Sign up to track your course progress, gain access to final exams, and get a free certificate of completion!
History of the Java Programming Language Mark as completed. On April 2, , James Gosling resigned from Oracle. Principles There were five primary goals in the creation of the Java language: It must be simple, object-oriented, and familiar. It must be robust and secure. It must be architecture-neutral and portable. It must execute with high performance. It must be interpreted, threaded, and dynamic. Mark as completed.
Jump to Course Syllabus What is Computation? The Java garbage collector automatically deletes a non-reachable object if no reference to an object remains, freeing memory and avoiding memory leakage. Some developers tend to use Java for the design of GUI applications, while others use Java to build a range of web applications.
Java is also widely used in manufacturing mobile and android games, the most extensively-installed mobile platform. Java is a sophisticated and stable language for programming. However, Oracle Corporation updates the programming language regularly with the help of a dynamic community. Each new Java version has many new features and performance improvements.
Programmers need to write applications with the use of several devices and platforms. Therefore, they are looking for a programming language that lets them write the application code once and use the application code across multiple platforms without any additional effort.
The programmers can simply compile the Java code once and deploy it across varied platforms without recompiling the code. The bytecode enables the application code deployed by programmers on any Java supporting platform. They can also quickly transport the app from one platform to the next without constantly compiling the code. Thus it is easier for beginners to learn and use Java in less time.
Simultaneously, Java is a rival class-based programming language that is object-oriented. Because Java embraces popular object-oriented programming principles such as heritage, polymorphism, abstraction, and enclosure, the applications are made modular, extensible, and scalable more readily accessible by programmers.
The developers can also benefit from such Java libraries to more effectively incorporate object-oriented design concepts. During the development of mobile apps, the mobile device with the most extensive installation base cannot be overlooked by any developer.
But Google suggests the developers of mobile apps write Android apps in Java only. By typing it in Java, developers can further improve the performance and compatibility of the Android apps. Developers also have the option to write sturdy Android apps in Java in a shorter time, using various tools and libraries. Java dominates other languages in the programming interfaces rich application programming interfaces APIs category.
The programmers have the option of creating popular development projects by using a variety of Java APIs without adding any extra code. Some of these APIs are shared by significant corporations, and others are downloaded by community members.
Developers can use APIs to link databases, inputs and outputs, networks, utilities, protection, and XML parsing according to their needs. In general, a Java developer can use Java to write GUI, mobile, and web applications for desktop applications.
The simplicity and versatility of Java make it, in the real sense, a general programming language. Simultaneously, the Java frameworks and programming tools make Java one of the most common languages of the year. Happy learning! Ajay Sarangam 30 Jan Introduction Java is one of the most popular programming languages used by software developers all over the world.
Table of contents What is Java? Although there are many interpretations of OO, one primary distinguishing idea is to design software so that the various types of data it manipulates are combined together with their relevant operations. Thus, data and code are combined into entities called objects. An object can be thought of as a self-contained bundle of behavior code and state data. The principle is to separate the things that change from the things that stay the same; often, a change to some data structure requires a corresponding change to the code that operates on that data, or vice versa.
This separation into coherent objects provides a more stable foundation for a software system's design. The intent is to make large software projects easier to manage, thus improving quality and reducing the number of failed projects. Another primary goal of OO programming is to develop more generic objects so that software can become more reusable between projects. A generic "customer" object, for example, should have roughly the same basic set of behaviors between different software projects, especially when these projects overlap on some fundamental level as they often do in large organizations.
In this sense, software objects can hopefully be seen more as pluggable components, helping the software industry build projects largely from existing and well-tested pieces, thus leading to a massive reduction in development times. Software reusability has met with mixed practical results, with two main difficulties: the design of truly generic objects is poorly understood, and a methodology for broad communication of reuse opportunities is lacking.
Some open source communities want to help ease the reuse problem, by providing authors with ways to disseminate information about generally reusable objects and object libraries.
Platform independence The second characteristic, platform independence, means that programs written in the Java language must run similarly on diverse hardware.
One should be able to write a program once and run it anywhere. This is achieved by most Java compilers by compiling the Java language code "halfway" to bytecode specifically Java bytecode —simplified machine instructions specific to the Java platform. The code is then run on a virtual machine VM , a program written in native code on the host hardware that interprets and executes generic Java bytecode. Further, standardized libraries are provided to allow access to features of the host machines such as graphics, threading and networking in unified ways.
Note that, although there's an explicit compiling stage, at some point, the Java bytecode is interpreted or converted to native machine instructions by the JIT compiler.
There are also implementations of Java compilers that compile to native object code, such as GCJ, removing the intermediate bytecode stage, but the output of these compilers can only be run on a single architecture.
Sun's license for Java insists that all implementations be "compatible". This resulted in a legal dispute with Microsoft after Sun claimed that the Microsoft implementation did not support the RMI and JNI interfaces and had added platform-specific features of their own. In response, Microsoft no longer ships Java with Windows, and in recent versions of Windows, Internet Explorer cannot support Java applets without a third-party plug-in.
However, Sun and others have made available Java run-time systems at no cost for those and other versions of Windows. The first implementations of the language used an interpreted virtual machine to achieve portability.
More recent JVM implementations produce programs that run significantly faster than before, using multiple techniques. The first technique is to simply compile directly into native code like a more traditional compiler, skipping bytecodes entirely. This achieves good performance, but at the expense of portability.
Another technique, known as just-in-time compilation JIT , translates the Java bytecodes into native code at the time that the program is run which results in a program that executes faster than interpreted code but also incurs compilation overhead during execution.
More sophisticated VMs use dynamic recompilation, in which the VM can analyze the behavior of the running program and selectively recompile and optimize critical parts of the program. Dynamic recompilation can achieve optimizations superior to static compilation because the dynamic compiler can base optimizations on knowledge about the runtime environment and the set of loaded classes.
JIT compilation and dynamic recompilation allow Java programs to take advantage of the speed of native code without losing portability. Portability is a technically difficult goal to achieve, and Java's success at that goal has been mixed. Although it is indeed possible to write programs for the Java platform that behave consistently across many host platforms, the large number of available platforms with small errors or inconsistencies led some to parody Sun's "Write once, run anywhere" slogan as "Write once, debug everywhere".
Platform-independent Java is however very successful with server-side applications, such as Web services, servlets , and Enterprise JavaBeans, as well as with Embedded systems based on OSGi, using Embedded Java environments.
0コメント