Advantages of Inheritance in java.

Answer Posted / jadhavpnilesh

I read all the answers and same I explained in my recent
interview. She asked me instead of inheriting the class i
will create object of class and call methods of that class
is it not reuse of code ? What she was expecting exactly,
can anyone help ?

Is This Answer Correct ?    16 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of literals are there in JAVA?

596


Find the value of a specified element of the array arr[i] where 0 <= i <= n-1

543


Is c better than java?

547


Is 0 an even number?

551


What methodology can be utilized to link to a database?

506






Can you use abstract and final both with a method?

573


What is a 16 bit word?

567


Name and explain the types of ways which are used to pass arguments in any function in java.

572


What is the difference between scrollbar and scrollpane?

612


Tell me how many ways are there to initialise an integer with a constant.

646


Can constructor be static or final?

652


Can a boolean be null java?

545


What are access specifiers in java ?

590


How are variables stored?

533


Difference between nested and inner classes ?

610