Sunday, August 15, 2004 06:00 AM
it has abstract method
it has some defined method
class varible is not mandaterly static one
it does not support mutilevel inheritance
it has only abstract method.
class varibale sholud be final and static.
it does support mutilevel inheritance
Sunday, August 1, 2004 03:07 AM
Difference b/w Abstract classe 'n Interface:
1)Abstract classes may have some executable methods and methods left unimplemented. Interfaces contain no implementation code.
2)A class can implement any number of interfaces, but subclass at most one abstract class.i.e interfaces are used to provide MULTIPLE INHERITANCE in java.
3)An abstract class can have nonabstract methods. All methods of an interface are abstract.
(1 and 3 imply that an interface provides for 100% abstraction.)
4)An abstract class can have instance variables. An interface cannot.
5)An abstract class can define constructor. An interface cannot.
6)An abstract class can have any visibility: public, protected, private or none (package). An interface's visibility must be public or none (package).
Tuesday, July 20, 2004 09:08 PM
Check out the java tutorial from Sun !