UPDATE: For all my blog readers who are requesting for more information on OOPS Concepts with example. Please refer the ‘More On Concepts’ section. It has more explanations with examples.
More On Concepts
1. Introduction
2. Inheritance
3. Polymorphism
4. Encapsulation
What is an Object?
An object is a software bundle of related state and behavior.
Software objects are often used to model the real-world objects that you find in everyday life.Real-world objects share two characteristics: They all have state and behavior.
Dogs have state (name, color, breed, hungry) and behavior (barking, fetching, wagging tail).
Software objects are conceptually similar to real-world objects:
they too consist of state and related behavior.
An object stores its state in fields (variables in some programming languages)
and exposes its behavior through methods (functions in some programming languages).
Methods operate on an object’s internal state and serve as the primary mechanism for object-to-object communication.
Hiding internal state and requiring all interaction to be performed through an object’s methods is known as
data encapsulation — a fundamental principle of object-oriented programming
What Is a Class?
A class is a blueprint or prototype from which objects are created.
What Is Inheritance?
Inheritance provides a powerful and natural mechanism for organizing and structuring your software.
What Is an Interface?
An interface is a contract between a class and the outside world.
When a class implements an interface, it promises to provide the behavior published by that interface. What Is a Package?
A package is a namespace for organizing classes and interfaces in a logical manner.
Placing your code into packages makes large software projects easier to manage.




good
it is ok
clear and concise..well done B S
Could you talk more on the Method Overriding please
can u brief on polymorphism and abstract classes….
@Jenni, Bala – Visit http://idynsolutions.wordpress.com
for more info
EXCELLENT
Excellent
Excellent -please explain interface with real time examples.,i.e., How you explained (Dogs have state (name, color, breed, hungry) and behavior (barking, fetching, wagging tail).).please
I fell that explanation given for Inheritance is not good enough. Please update the same.
@Guna – refer http://idynsolutions.wordpress.com..
could you please come up with more detail about classes
@putta – Can you visit http://idynsolutions.wordpress.com for more explanations.
be specific, cos we cant say it directly in interview. Make it somehow technical
Can u give some more information with examples.
the definition and explaination given by you is not sufficient. Please explain more with examples using C++.
why exactly interfaces are used please let me know with programming examples
Peace people
We love you
my comments on definition
object its nice.
inheritance you refered the advantage.but main concept is not here.
similarly interface.
package really gives satisfation.
bad u copied from other
Thanks for this blog… but your answers to the questions seems like they were taken directly from he Sun Certified Java Programming Class.
@Yomaha – Definitions of the terms will always be the same
its very good
very good
not enough
your style & designs are OK…..
But your answers for the questions are same as that of the answers from ‘ JAVA.SUN.com’….
Thank you.
can u please explain abt the collection class
A Container class is defined as a class that gives you the power to store any type of data. There are two types of container classes available in OOPS, namely “Simple Container Classes” and “Associative Container Classes”. An Associative Container class associates a key to each object to minimize the average access time.