explain oops concepts with examples?

Answer Posted / mudassir shakil

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 ?    16 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is re-factoring in software?

576


What is java Applet?

650


What is a substring of a string?

565


Can we sort hashset in java?

629


What is a wrapper method?

535






What is arrays aslist in java?

521


Give us a program to check for parenthesis matching using stack.

560


What happens if constructor is private?

566


Is minecraft 1.15 out?

545


How many bytes are a float?

507


What do you mean by access modifier?

558


Why do we use return statement?

539


What state is a thread in when it is executing?

525


Is math an abstract class in java?

534


How dead lock situation occurs in java and how you can identify it?

542