If all the methods in abstract class are declared as
abstract then what is difference between abstract class and
in interface?
Answer Posted / ashok kumar
Methods in the abstract class can be accessed only through
a class hierarchy i.e through inheritance.
But methods in the interface can be accessed anywhere i.e
across the class hierarchy.(without inheritance).
| Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
How do you use nextline in java?
What is meant by distributed application? Why are we using that in our application?
What is the default value of local and global variables?
Why string is immutable with example?
Which is faster call by value or call by reference?
What is the difference between reader/writer and inputstream/output stream?
Explain creating threads by extending thread class ?
I want to print “hello” even before main is executed. How will you acheive that?
Is an integer an object?
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?
What are some examples of variable costs?
What are the important methods of java exception class?
How objects are stored in java?
What do you mean by local variable and instance variable?
Can we catch more than one exception in single catch block?