Difference between interface and abstract class?
Answers were Sorted based on User's Feedback
Answer / jenypatel86
There is no difference in the functionality of these two.The
only difference is that a class cannot extend an abstract
class if it already is extending some other class.An interface
on the other hand can be implemented in any situation which
makes them very powerful.Also user defined exceptions can be
defined within an interface itself, which is not the case with
an abstract class.
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / m.shanmuga sundaram rjnsoftwar
There are some subtle differences between an abstract class
and an interface
1)
A class can inherit multiple interfaces
A class can inherit only one abstract class
2)
An interface does not contain any access specifier,fields
and code. By default the access specifier is public.
An abstract class can contain any access specifier,fields
and code.
Is This Answer Correct ? | 4 Yes | 2 No |
When will you use shell script/Perl ahead of C/C++?
How to set on/off a group of indicators in a single statement?
What binary value will be internally stored for NULL for the type S9(1) COMP 3 in mainframe
Hi Friends , i am very new in VB 6.0 Any body can able to help me ? i need interview question and answer vb 6.0 . please send honeysukumar@yhaoo.com
in a VB application, where the data will be stored after manipulation? what is the syntax for that?
iam confused among testing ,.net and java. can anybody help me.
could u please also write an example of a code that involves instances from an abstract class just as u did for interfaces because u said it could also work which i really doubt. thanks
WS-NUM PIC S9(05)V(02) SIGN TRAILING SEPARATE MOVE '0050000+' TO WS-NUM The value stored is 00500,00+ MOVE '0050000-' TO WS-NUM Then what is the value will be stored in WS-NUM? Am getting '-00500,00'.....>>> What should I declare to WS-NUM so that I can get correct values for both + & - signs.
Given a set. Write the pseudo code to get all the subsets for the given set. Eg. Input : {1,2} Output : (),(1),(2),(1,2)
how can we get version of database ?
WHAT IS THE MEANING OF CONSTANT ...EXEEDS LENGTH LIMIT WHILE COPYING FROM PS FILE TO KSDS
In Java what is the difference between following two statements ? int a[],b; int []a,b;