What is the diff. b/w Interfaces & Abstract class?
Answer Posted / lakshman
abstract class contains constructor,but interface does not.
abstract class supports all access specifier,but interface
supports only public
programmer is responsible to provide the subclass to
abstract class but interface left the implementation for the
third party vendors.
abstract class contains both abstract methods and concrete
methods but interface contains only abstract methods
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Say you want to store the information about a number of pets in an array. Typical information that you could store for each pet (where relevant) would be • Breed of animal • Animal's name • Its birth date • Its sex • Whether it has been sterilised or not • When it is due for its next inoculation • When it last had its wings clipped For each type of pet (eg. dog, cat or bird) you would typically define a class to hold the relevant data. Note: You do not need to implement these classes. Just answer the following questions. 3.1.1 What would be the advantage of creating a superclass (eg. Pet) and declaring an array of Pet objects over simply using an array of Objects, storing each of the instances of the different pet classes (eg. Dog, Cat or Bird) in it? 3.1.2 Would you define Pet as a class or as an interface? Why? (2) (2)
How do you square a number in java?
Explain different forms of polymorphism?
What are inner classes or non static nested classes in java?
How do you sing an Applet ?
What is double parsedouble in java?
If goto and const is reserve words than why it is not work in java?
what are the disadvantages of indexes in oracle?
Write a java program to count the number of words present in a string?
What do you mean by formatting?
Is array a class?
Is age discrete or continuous?
What is contractor means and methods?
Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?
Where is const variable stored?