Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Init()

 
rex tony
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Servlet,
In Servlet Interface which has method name is called Init(ServletConfig con),
In Generic Servlet Abstract class has Init() method.
What is the difference of the both?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is in the API.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is covered in the Servlets FAQ. Please be sure to check the FAQ before posting questions that have already been covered.
 
jasson jasson
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by rex tony:
In Servlet,
In Servlet Interface which has method name is called Init(ServletConfig con),
In Generic Servlet Abstract class has Init() method.
What is the difference of the both?


HI:
First,Servlet Interface is a interface,the method in Servlet is only a
declare.Generic Servlet implements Serlvet interface,so it must implement
all the methods in Servlet.So,Init() method in Servlet or Generic Servlet,one is declare,the other is implement;
 
wang jiajian
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please google adapter
 
wang jiajian
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


when we wan`t use one method() of interface A like c(),but i don't want implment all method().

so you need a adapter to implment all method of interface A,the method in adapter do nothing like

when we have one adapter ,you can extend it and overriding thr method which you wan`t use.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"jasson jasson",
Please check your private messages
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic