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

Is java 1.7 the same as java 7?

522


State the difference between creating string as new () and literal.

513


What are the two types of java?

509


What are structs in java?

556


What is the purpose of a parameter?

515






Can we use switch statement with strings?

609


Who is the owner of java?

527


What is oop in java?

516


what invokes a threads run() method? : Java thread

563


Using callable statement how can you pass out parameters, explain with example?

574


How can I debug the Java security exceptions and AccessControlExceptions?

621


How objects are stored in java?

538


What is immutable class in java?

506


What is byte [] in java?

523


What is difference between string and stringbuffer?

485