Tell me real world example of polymorphism and encapsulation .

Answer Posted / pankaj

Rael world example fo polymorphism can be start machnism of
bike, inwhich u wil hav same method start() but it may be
either by kick start or button start.
N example for encapsulation can be a stack or queue doesn't
matter how it is implented internally with linked list or array

Is This Answer Correct ?    64 Yes 27 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Who invented merge sort?

488


How do you search for a target key in a linked list?

757


What is different between array and list?

495


State the difference between persistent and ephemeral data structure?

1037


How can you correct these errors?

503






What is peep stack?

591


How dynamic arrays are created?

480


Write the stack overflow condition.

590


What do you mean by probing?

514


Define ancestor and descendant ?

553


What is an object array?

527


You want to insert a new item in a binary search tree. How would you do it?

540


How does bogo sort work?

585


Which collection allows null values?

495


Can we use any class as map key?

453