Inheritance: It is the process of creating the new classes and using the behavior of the existing classes by extending them just to reuse the existing code and adding the additional features as needed.Įncapsulation: It is the mechanism of combining the information and providing the abstraction. To be an Object Oriented language, any language must follow at least the four characteristics. It also has the automatic memory allocation and deallocation system. Java provides the bug free system due to the strong memory management. It is much harder to write the java programs that can crash the system but we can not say about the other programming languages. Programs are easy to write and debug because java does not use the pointers explicitly. There are various features that makes the java as a simple language.
The programs written on one platform can run on any platform provided the platform must have the JVM. Not even a single language is idle to this feature but java is more closer to this feature. The concept of Write-once-run-anywhere (known as the Platform independent) is one of the important key feature of java language that makes java as the most powerful language. The applet, offered by JavaWorld magazine (at the URL ) in conjunction with Quote.Com, updates a stock portfolio dynamically with quotes updated in real time. Figure 1.3 shows an example of a Java applet that dynamically updates itself. Information can change in response to user input or be updated dynamically as a Web page is viewed. Lather, rinse, repeat.Ī Java applet running on a Web page provides a much richer experience-both in terms of information and user interaction. Someone using a browser asks for a page, looks it over, asks for another, looks it over, and so on. The Web distributes almost all information in a passive manner. Java programs made a big splash on the Web because they offered interactivity in a medium that was largely one way. If another Worker object uses the DoubleCheckFunds object, a Police object will be called.The feature that is best known about Java is that it can be used to create programs that execute from World Wide Web pages. In OOP, a computer program is considered to be a group of objects that interact with each other.Ĭonsider an embezzlement program implemented with Java: A Worker object skims some Money objects from the CompanyFunds object and puts them in its own BankAccount object. Object-oriented programming (OOP) is an unusual but powerful way to develop software. Java is an object-oriented programming language developed by Sun Microsystems that plays to the strengths of the Internet.