I have a class which is abstract which contains only the
abstract methods. This is similar to an interface. Then, if
i have given a choice to choose one of them. Which one i
have to choose and why?

Answer Posted / ashoka

Better to choose Abstract class. Because it contains not
only the abstract methods but also implemented methods but
in interfaces only unimplemented methods will be there and
all final variables will be there.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the buffer limit?

561


What is regex java?

561


what is abstract class in Java?

652


Explain 5 io best practices?

597


What is the use of callablestatement?

580






Explain the public class modifier?

507


What is a generic type?

564


How do you achieve polymorphism in java?

523


Explain features of interfaces in java?

560


What is final keyword in java? Give an example.

578


What is int argc char * argv?

569


Why parameters should be passed by reference?

503


What is the meaning of nullable?

576


What is == and === in javascript?

561


What is regex in java?

531