Object Oriented

Explaining Access Modifiers with Example Code

We have discussed the theory about access modifiers in the previous note. This note will give you an example code that will show the valid and invalid usages for members belonging to different access levels from different regions of your code such as same class, subclass in same package, subclass in another package and a non-subclass in another package.  

Operator Plus(+) Overloading in Java

Java doesn't allow operator overloading yet + is overloaded for class String. Here we will discuss examples for use of + with Strings and characters.

Summary of Object-Oriented Programming (OOP) Concepts in Java

Object-Oriented Programming (OOP) uses "objects" to model realworld objects. Object-Oriented Programming (OOP) consist of some important concepts namely Encapsulation, Polymorphism, Inheritance and Abstraction. These features are generally referred to as the OOPS concepts. 

Association vs Aggregation vs Composition

In object oriented programming or in Unified Modelling, relationships between objects can be classified as association, aggregation, composition and inheritance. 



Association is a relationship between two objects. Here objects might not be completely dependent on each other.

Introduction to Object Oriented Systems Development

Object-Oriented Development uses "objects" to model real world objects. A car or a laptop can be considered as object. While traditional programming views software as a collection of functions, an object oriented system concentrates on the objects that combines data and functionality together.

The traditional approach mostly focussed on structured system development and the technique used was usually referred to as the Structured Analysis and Design Technique (SADT). 


Introduction to Object Oriented Analysis, Design and Implementation

Let us quickly see object oriented analysis, object oriented design, object oriented implementation using a 'Library Management System' example.

Polymorphism in Java

The ability to change form is known as polymorphism. Java supports different kinds of polymorphism like oveloading and overriding.



The same method name (method overloading) or operator symbol (operator overloading) can be used in different contexts.

In method overloading, multiple methods having same name can appear in a class, but with different signature. And based on the number and type of arguments we provide while calling the method, the correct method will be called.

Inheritance in Java

Inheritance describes the parent child relationship between two classes.

A class can get some of its characteristics from a parent class and then add more unique features of its own. For example, consider a Vehicle parent class and a child class Car. Vehicle class will have properties and functionalities common for all vehicles. Car will inherit those common properties from the Vehicle class and then add properties which are specific to a car.

Encapsulation in Java

Encapsulation is the process of wrapping up of data (properties) and behavior (methods) of an object into a single unit; and the unit here is a Class (or interface). Encapsulate in plain English means to enclose or be enclosed in or as if in a capsule. In Java, everything is enclosed within a class or interface, unlike languages such as C and C++ where we can have global variables outside classes. 

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!