is memory to the abstract class allocated ..or objects not
instantiated

Answer Posted / amit jayaswal

Actually the fact is this that abstract class is used to achieve polymorphism (abstraction 0-100) & for code sharing among closely related concrete classes, there are no need to create and object of abstract class direct using "new" operator, because there are some abstract method & nothing to be allocated for abstract method they are here only for abstraction and there are some another non abstract method (for code sharing) and attribute inside abstract class and memory will be allocated for those members on the basis of their belonging concrete class. while we invoke constructor of their concrete class then the constructor of abstract class will be invoke implicitly.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can I declare a class as private?

591


What is meant by attribute?

593


How can u increase the heap size in the memory?

554


Why java is used everywhere?

591


What is the difference between array list and vector in java?

509






What does math floor () do?

555


Why do we need array in java?

534


Does a class inherit the constructors of its superclass in java programming?

529


Explain about the select method with an example?

591


What is a line break example?

580


What’s the difference between constructors and other methods?

531


Explain creating threads by implementing runnable class?

590


Can we override final method?

571


What is a private class in java?

507


What is difference overloading and overriding?

579