what are the oops concept in java explain with real time
examples

Answer Posted / niventh mca

1,class
2,encapsulation
3,polymorphism
4,inheritance
5,Abstraction

class
collection of attributes is called class
Real time example......human body

encapsulation
To encapsulate the some methods,operations in one
class is called the encapsulation
Real time example...... capsules

polymorphism
To ability to take more than one form
Real time example...... xerox machine
inheritance
one class properties occur from another class properties
Real time example......land line...will phone....cellphone
2g....3g....

Is This Answer Correct ?    76 Yes 34 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a method and a function in alice?

840


What are the uses of synchronized keyword?

783


What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?

898


When can an object reference be cast to an interface reference in java programming?

797


Can we use a switch statement with strings?

796


Can a source file contain more than one class declaration?

752


Can an interface implement another interface?

815


What is the function of log?

763


Is cout buffered?

912


What are constants?

828


Explain the difference between a Thread and a Process.

806


What is size_t?

768


What is the difference between state-based unit testing and interaction-based unit testing?

754


What is native method in java?

814


Difference between error and exception

5523