explain oops concepts with examples?

Answer Posted / srinu

dataabstraction:it is giving only important things hiding
unnecessary things

encapsulation : it is data hiding under wrapper class

inheritance :it is reusebility code
example : parent propert belongs to child

polymorpism: it is flexibility when output depends upon
no of input
in this we have overloading




overloading means it contains same data type and
different parameters

Is This Answer Correct ?    77 Yes 35 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is function and its uses?

575


Can we have a method name same as class name in java?

583


What is a java lambda expression?

562


What is the java project architecture?

1789


What is java virtual machine and how it is considered in context of java’s platform independent feature?

659






How to print an arraylist in java?

509


Can an interface extend another interface?

602


In Java list the methods that can be overridden?

575


What is Java Package and which package is imported by default?

602


What are data structures in java?

535


What is a boolean structure?

565


Can you write a java class that could be used both as an applet as well as an application?

521


What is comparable and comparator interface? List their differences

583


What is printwriter in java?

522


What are the types of inner classes (non-static nested class) used in java?

572