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 / harikrishna

you never get a chance to choose a method from abstract
class,because if you are writing a abstract class you
have to provide implementation to all the methods in
subclass otherwise you should declare that subclass as
Abstractclass.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How you can force the garbage collection?

540


Compare Mutex and Semaphore in java.

562


What is the meaning of variables in research?

533


Can a function return a function?

552


What is composition in java?

730






What is java algorithm?

523


Does treeset use compareto?

543


Give example to differentiate between call by value and call by reference.

593


Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?

1022


Explain how can you debug the Java code?

592


What is an abstract method in java programming?

607


Write a code to show a static variable?

618


What is hashing principle in java?

552


What is dynamic binding(late binding)?

590


Is a class subclass of itself?

604