GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java

 Print  |  
Question:  why java does not support inheritance of multiple superclasses?
what is achieved by inheritance?
why there is no main method in servlets/jsps?




May 05, 2006 00:42:46 #8
 veds_21   Member Since: May 2006    Total Comments: 1 

RE: why java does not support inheritance of multiple ...
 

hi all,

 suppose  we write  class C extends class B A

When are creating an object  of calss C ,then as we know before sub class's constructor is initialised ,the super class's  constructor should be initialised. Then at this moment the JVM will get confused to  initialise which super class's constructor  first either of class A or of calss B .

I think this is the basic problem for multiple inheritance through extend  keyword.

Bye  bye 

Vedabyasa Swain

Veds_21@yahoo.co.in

     

 

Back To Question