This is a discussion on difference between abstract class and interface within the Java Programming forums, part of the Software Development category; Difference between abstract class and interface a) All the methods declared inside an interface are abstract whereas abstract class must ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Difference between abstract class and interface a) All the methods declared inside an interface are abstract whereas abstract class must have at least one abstract method and others may be concrete or abstract. b) In abstract class, key word abstract must be used for the methods Whereas interface we need not use that keyword for the methods. c) Abstract class must have subclasses whereas interface can't have subclasses.
__________________ J.Vijayanand |
| Sponsored Links |
| |||
__________________ $enthil |
| |||
| the main differences between an interface class and abstract class are 1.abstract classes must be given by keyword abstract,where as in interface class with key word interface 2.every method in interface class should be abstract,but this is not necessary in abstract class 3.by default what ever variables we decalre in interface are public static final,where as in abstract class they can be default and instance variables also
__________________ Shaalini.S ![]() Be the Best of Whatever you are... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Difference between abstract class and interface | srikumar_l | C# Programming | 0 | 12-17-2007 03:18 AM |
| List out all the similarities/difference between an Abstract class and Interface? | H2o | ASP and ASP.NET Programming | 1 | 07-24-2007 03:16 AM |
| What’s the difference between an interface and an abstract class? | Sabari | Java Programming | 1 | 07-17-2007 05:00 AM |
| interface extending a class | vigneshgets | Java Programming | 0 | 05-22-2007 04:13 AM |
| Abstract Class | nhoj | Java Programming | 1 | 05-08-2007 05:35 AM |