Can you explain the difference b/n abtract and interface
with a good example,?In what cases we have use abtract and
what case interface?
Answer Posted / ipdarsini
Interface is the 1st Level.here methods does not contain
any executable code.just it contains only declerations.here
in interface level we does not know anything.
Abstract class is a class which contains methods which may
contains exceutable code or not.this is the 2 nd level.here
in abstarct class level we know some thing.
for ex take a maruthi car.......
in interface level.
we doesn't know about egine company........some parts.....
we know .....but its not sure...
in abstract class level
for ex take a maruthi 800 car......
we knows the comapany of that car.
here we know about some thing bcz here they mentioned
maruthi 800....
thats the difference.....
| Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
How to sort elements in a parallel array in java?
Does java initialize arrays to zero?
Can you call one constructor from another if a class has multiple constructors?
What is the function of http?
Q1.A. Write note on “The class path Environment Variable”? B. Which are different kinds of source code? Q2.A. How to create an interface? B. Why convert an applet to an application? Q3.A. How to use Media tracker Class. B. How to use string tokenizer class. Q4 A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on “The properties class” Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.
How do you use equal in java?
What are the Class Libraries ?
Explain about java sdk?
What does split function do in java?
What are the main uses of the super keyword?
Explain what access modifiers can be used for variables?
Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?
What class of exceptions are generated by the java run-time system?
What is a wrapper method?
Is null an object in java?