core java question
4 posts in topic
Flat View  Flat View

Posted By:   rajesh_renke
Posted On:   Monday, July 19, 2004 02:50 AM

Question 1 :
what is the difference between abstract class and an interface ?

Question 2 :
without implementing serializable what are other alternative ways to serialize a servlet or class ?

Question 3 :
what is the diffrence between sendRedirect() method and forward(), what would you recommend which to use when ?

Re: core java question

Posted By:   vadivel_mohan  
Posted On:   Sunday, August 15, 2004 06:00 AM

1.abstract class:
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

Re: core java question

Posted By:   Eridanus_Eridanus  
Posted On:   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).

Re: core java question

Posted By:   Anonymous  
Posted On:   Tuesday, July 20, 2004 09:08 PM

Check out the java tutorial from Sun !

Re: core java question

Posted By:   Benoit_Quintin  
Posted On:   Tuesday, July 20, 2004 06:23 AM

About | Sitemap | Contact