Académique Documents
Professionnel Documents
Culture Documents
Encapsulation
is a mechanism that binds together attributes and methods into a single
object, and keeps both safe from interference or misuse, that is, the details of the
object are encapsulated or hidden, from the user. The user knows that the method
can be requested but does now know how the specifics of how the method is
performed. This can be called information hiding.
Inheritance
An object maybe part of a large category of objects called a class. Every
object in a class shares similar methods and attributes as the original objects. The
higher-level class is called “superclass” the lower level class is called “subclass”.
This concept of low levels inheriting attributes and methods of a superclass is
called inheritance.
Polymorphism
Benefits of Object-oriented Programming
Java removes several features considered unsafe and also frees memory.
Hence, it cuts down on the chances of making mistakes in the program.
A major benefit of object-oriented approach is the ability to reuse the
defined objects and modify existing objects. The object-oriented approach to
program development saves programming time.
Java’s adaptability is also a benefit as it is able to fit in different
environment.
The advantage of object-oriented approach is reliability as it is able to
operate correctly under all conditions.
Introduction to Java Programming
Java programming language is an object-oriented language that is used both for
general-purpose business programs and interactive World Wide Web (WWW)-
based Internet programs developed by Sun Microsystems. The first version of
Java was introduced in 1995 and the language was then called “Oak”.
The language is modeled after the C++ programming language and it has
eliminated some of the most difficult features to understand in C++.
Java can be used for developing applets, which resides in www servers
downloaded by a browser to a client’s system, and run by the browser.
Java is platform independent
Resources to create a Java Program
Access specifier