ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
what are the oops concept in java explain with real time 
examples
 Question Submitted By :: Jawahar
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what are the oops concept in java explain with real time examples
Answer
# 1
Encapsulation

Abstraction

polymorphisms

inheritance/delegation
 
Is This Answer Correct ?    32 Yes 11 No
Raja
 
  Re: what are the oops concept in java explain with real time examples
Answer
# 2
OOPS Concepts are mainly 4 
 1.Abstraction
 2.Encapsulation
 3.Inheritance 
 4.Polymorphisam
Abstraction:-Hidding non-essential features and showing the
essential features

              (or)
Hidding unnecessary data from the users details,is called
abstraction.
Real Time example:TV Remote Button 

in that number format and power buttons and other buttons
there.just we are seeing the butttons,we don't see the
button circuits.i.e buttons circutes and wirings all are
hidden.so i think its good example.

Encapsulation:

    Writing Operations and methods stored in a single
class.This is Called Encapsulation

Real Time Example:Medical Capsuals
i.e one drug is stored in buttom layer and another drug is
stored in Upper layer these two layers are combined in
single capsual.

Inheritance:
   The New Class is Existing from Old Class,i.e SubClass is
Existing from Super Class.

Real Time Example:
      Father and Son Relationship

Polymorphisam:

          Sinle Form behaving diffreantly in diffreant
Situations.
  Example:-
            Person
Person in Home act is husband/son,
       in Office acts Employer.
       in Public Good Cityzen. 

I think these all are real time experianceany.is there any 
more answers send me my mail also.

Thanks all
CM
 
Is This Answer Correct ?    81 Yes 7 No
Chandramouli
 
 
 
  Re: what are the oops concept in java explain with real time examples
Answer
# 3
1)Abstraction: 

Abstraction is a way to remove the association of the
behavior of an object with the actual details behind the
scenes which implement that object's behavior. This
'abstraction' is usually accomplished through the use of
base classes with virtual functions; each derived function
provides the details that implement the behavior behind that
abstraction.

eg/we invented flight based on the mechanism of Birds. So
flight is derived form the base of birds.

2)Encapsulation: 

It is a process of binding or wrapping the data and the
codes that operates on the data into a single entity. This
keeps the data safe from outside interface and misuse. One
way to think about encapsulation is as a protective wrapper
that prevents code and data from being arbitrarily accessed
by other code defined outside the wrapper.

eg/ Ink is the important component in pen but it is hiding
by some other material

3)Polymorphism: 

a single function or single operator has different character
in different place.

eg/A girl plays a role of daughter at home and a manager at
office

4)Inheritance:

 The new classes, known as derived classes, take over (or
inherit) attribute and behavior of the pre-existing classes,
which are referred to as base classes (or Parent classes).
It is intended to help reuse existing code with little or no
modification.

eg/ parent-child relation
 
Is This Answer Correct ?    12 Yes 1 No
Ramya
 
  Re: what are the oops concept in java explain with real time examples
Answer
# 4
OOPS Concepts are mainly 4 
 1.Abstraction
 2.Encapsulation
 3.Inheritance 
 4.Polymorphisam
Abstraction:-Hidding non-essential features and showing the
essential features

              (or)
Hidding unnecessary data from the users details,is called
abstraction.
Real Time example:TV Remote Button 

in that number format and power buttons and other buttons
there.just we are seeing the butttons,we don't see the
button circuits.i.e buttons circutes and wirings all are
hidden.so i think its good example.

Encapsulation:

    Writing Operations and methods stored in a single
class.This is Called Encapsulation

Real Time Example:Medical Capsuals
i.e one drug is stored in buttom layer and another drug is
stored in Upper layer these two layers are combined in
single capsual.

Inheritance:
   The New Class is Existing from Old Class,i.e SubClass is
Existing from Super Class.

Real Time Example:
      Father and Son Relationship

Polymorphisam:

          Sinle Form behaving diffreantly in diffreant
Situations.
  Example:-
            Person
Person in Home act is husband/son,
       in Office acts Employer.
       in Public Good Cityzen. 

I think these all are real time experianceany.is there any 
more answers send me my mail  mdevendra@gmail.com also.

Thanks all
Devendra.M
 
Is This Answer Correct ?    2 Yes 1 No
Devendra.m
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Which containers use a FlowLayout as their default layout?  3
how session will be expired? Infosys4
What is the difference between a public and a non-public class?  2
What is data abstraction? Elaborate with example? BMC3
How are commas used in the initialization and iteration parts of a for statement?  2
Name the packages in JDK?  2
Why java Don't Support Multiple interitence ABC7
IS method overriding is Duplication of Methods? CybAge4
What are Inner classes?  3
Are there any tools available in java to create reports?  5
What is the difference between Integer and int?  4
To what value is a variable of the Boolean type automatically initialized?  3
How can you say HashMap is syncronized? IBM13
how to handle http request in struts Polaris2
In which JDK version event-delegation model is introduced?  1
What is the purpose of setAutoCommit() ? Google1
whats is the use of final,in which situation final can be used in the application? DNS2
In C we use only compiler. Why java uses both compiler and interpreter? What is its significance?  5
explain the clone method and clonable interface  1
I have a Person object with 5 variables and I want to store them in a file called Person.txt. What should I do? KPIT3
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com