If all the methods in abstract class are declared as
abstract then what is difference between abstract class and
in interface?
Answer Posted / namita
In abstract class concrete methods are also there. concrete
methods are the one which has implementation. so in future
if any programmer wants to give concrete methods can use
abstract class not interface.
In abstract class for methods and variables
public,private,protected modifier can be use. but in
interface public and abstract are permitted.
| Is This Answer Correct ? | 18 Yes | 6 No |
Post New Answer View All Answers
Are arrays primitive data types?
What is a method type?
What is difference between array and vector?
What purpose do the keywords final, finally, and finalize fulfill?
What is getclass () getname () in java?
What is a jagged array in java?
Where and how can you use a private constructor?
Why are generics used?
What steps are taken when the OS shifts from one-thread execution to another?
What is the java idl system?
How do you reverse a list?
Define class?
Is multiple inheritance supported by java?
What is private static class in java?
Can we create an object of private class?