ALLInterview.com :: Home Page            
 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       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
   
 
Categories  >>  Software  >>  Java Related  >>  Java J2EE  >>  Core Java
 
 


 

 
 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
explain oops concepts with examples?
 Question Submitted By :: Ramanareddy333
I also faced this Question!!     Rank Answer Posted By  
 
  Re: explain oops concepts with examples?
Answer
# 21
object eg:chair
class eg:class class_name
data abstraction eg:to abstract one substance
data encapculation grouping of essintial details
inheritence eg:
polymorphisum
dynamic binding
message communication
 
Is This Answer Correct ?    8 Yes 7 No
P.prakash
 
  Re: explain oops concepts with examples?
Answer
# 22
1.Encapsulation-means wrapping or grouping data in single e
unit.
e.g. if you are planning to do computer course in a
institute but you don't know which course is going on in the
institute.But they have printed paper in which all the
courses are written like java,.net etc. This is called
encapsulation.
2.Abstraction-means hiding non essential information.
e.g.-Consider the above example.you have decided for java
the you enters in the institute and tell your course.The
person will explain you about java like duration;fee
structure etc.In simple words abstraction means information
according to the user.
3.Polymorphism-different existence.
e.g-you are a son,brother,uncle,husband and friend at
different situation.
 
Is This Answer Correct ?    12 Yes 5 No
Mudassir Shakil
 
  Re: explain oops concepts with examples?
Answer
# 23
OOP'S ~ Itz nothing but Object Oriented Programing
It mainly consist of

1.objects - these are the basic run time antities in object oriented system.They may represent a place,person or a data that the programer has to handle.
2.class - It is a collection of items.Itz decleration is same as of structure.The body of class is enclosed within '{}' & terminated by ';'.The class body contains the decleration of varible &function.
3.Inheritance - It is the process by which object of one class aquire the property of another class.
4.polymorphism - In this an operation may show different behaviour in different instance.
5.Encapsulation - The binding of data & function into a unit called as class n this is known as encapsulation
6.Abstraction - It refers to the act of represending the essential features without including the background details.
7.Dynamic binding - It means that the program code associated with a given procedure call is not known untill the time of call
 
Is This Answer Correct ?    7 Yes 2 No
Noorjahan .c
 
  Re: explain oops concepts with examples?
Answer
# 24
* Objects
* Classes
* Inheritance
* Data Abstraction
* Data Encapsulation
* Polymorphism
* Overloading
* Reusability

In order to understand the basic concepts in C++, the
programmer must have a command of the basic terminology in
object-oriented programming. Below is a brief outline of the
concepts of Object-oriented programming languages:

Objects:

Object is the basic unit of object-oriented programming.
Objects are identified by its unique name. An object
represents a particular instance of a class. There can be
more than one instance of an object. Each instance of an
object can hold its own relevant data.


An Object is a collection of data members and associated
member functions also known as methods.

Classes:

Classes are data types based on which objects are created.
Objects with similar properties and methods are grouped
together to form a Class. Thus a Class represent a set of
individual objects. Characteristics of an object are
represented in a class as Properties. The actions that can
be performed by objects becomes functions of the class and
is referred to as Methods.

For example consider we have a Class of Cars under which
Santro Xing, Alto and WaganR represents individual Objects.
In this context each Car Object will have its own, Model,
Year of Manufacture, Colour, Top Speed, Engine Power etc.,
which form Properties of the Car class and the associated
actions i.e., object functions like Start, Move, Stop form
the Methods of Car Class.

No memory is allocated when a class is created. Memory is
allocated only when an object is created, i.e., when an
instance of a class is created.

Inheritance:

Inheritance is the process of forming a new class from an
existing class or base class. The base class is also known
as parent class or super class, The new class that is formed
is called derived class. Derived class is also known as a
child class or sub class. Inheritance helps in reducing the
overall code size of the program, which is an important
concept in object-oriented programming.

Data Abstraction:

Data Abstraction increases the power of programming language
by creating user defined data types. Data Abstraction also
represents the needed information in the program without
presenting the details.

Data Encapsulation:

Data Encapsulation combines data and functions into a single
unit called Class. When using Data Encapsulation, data is
not accessed directly; it is only accessible through the
functions present inside the class. Data Encapsulation
enables the important concept of data hiding possible.

Polymorphism:

Polymorphism allows routines to use variables of different
types at different times. An operator or function can be
given different meanings or functions. Polymorphism refers
to a single function or multi-functioning operator
performing in different ways.

Overloading:

Overloading is one type of Polymorphism. It allows an object
to have different meanings, depending on its context. When
an exiting operator or function begins to operate on new
data type, or class, it is understood to be overloaded.

Reusability:

This term refers to the ability for multiple programmers to
use the same written and debugged existing class of data.
This is a time saving device and adds code efficiency to the
language. Additionally, the programmer can incorporate new
features to the existing class, further developing the
application and allowing users to achieve increased
performance. This time saving feature optimizes code, helps
in gaining secured applications and facilitates easier
maintenance on the application.

The implementation of each of the above object-oriented
programming features for C++ will be highlighted in later
sections.
 
Is This Answer Correct ?    12 Yes 4 No
Rajasekharareddy
 
  Re: explain oops concepts with examples?
Answer
# 25
there are type of oops concepts are there
1.objects/ class
1.Encapsulation
3.Abstraction
4.Polymorphism
5.Inheritance
6.Message passing
7.Dynamic binding
 
Is This Answer Correct ?    11 Yes 3 No
Palivela Sri Durgaprasad
 
  Re: explain oops concepts with examples?
Answer
# 26
abstraction is the process by which data and programs are
defined with a representation similar to its meaning.
reduce and factor out details to focus on few concepts
at a time.
 
Is This Answer Correct ?    7 Yes 2 No
Daydreamer
 
  Re: explain oops concepts with examples?
Answer
# 27
oops means Object Oriented Programming Language.It's
combined with Data And Procedures.........
OOPs have following features
1.Class $ Object--Encapsulation.
2.Function Overloading
> > Polymorphism
Function Overriding
3.Hierarchical--Inheritance

The Class Files only Understand byte code....


BYE........
 
Is This Answer Correct ?    3 Yes 5 No
Akash Biswas
 
  Re: explain oops concepts with examples?
Answer
# 28
oops....its a object oriented concept....
this concept is used in different language for reducing line
of code,complexity..
oops having 4 important pillar.
1)Abstraction:
*Hide unnecessary data and show only important think.
*we can create method of abstract class if method is
Abstract method.
2)Encapsulation:
* Binding data and provide security.
ex..
create
class A
{

}

class A binding all methods,variable etc..
and provide security.

3)Polymorphism
same think but behave differently..
Same method name but different parameter...
ex..Method A(int a,int b)//A method name and 2 parameter.
{
}
Method A(int a,int b,int c)//A method name and 3 parameter.
{
}
4)Inheritance
Ability to create new class from existing class...
*inheritance variable,method from existing class
ex..
class A
{
int a,b,c;
}
class B:A
{

}
so we dont need to declare these variable again class B bcoz
these variable inherit from existing class .
 
Is This Answer Correct ?    2 Yes 1 No
Sunil
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
what is overloading and overriding with example? CMC2
what is the use of clone method? why user cant overwrite in sub class without its proper defination. TCS2
In what type of containers, Border layout is a default layout?  3
What are library required to connect to excel sheet. Cap-Gemini2
whst is encapsulation?when u encpsulate actually while devoloping code? AMDOC7
What is the life cycle of Thread ? HCL12
If set accepts only one argument then how can it compare two objects to avoid duplicates  5
Superclass of exception Nous4
What are the Object and Class that classes used for?  3
when there is a need of jvm then how we can say that java is a platform independent language?  3
Difference between a Scrollbar and a ScrollPane?  1
What are hot spots in Java programming?  1
 
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 © 2012  ALLInterview.com.  All Rights Reserved.

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