• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Init()

 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The answer is in the API.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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;
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please google adapter
 
wang jiajian
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"jasson jasson",
Please check your private messages
 
reply
    Bookmark Topic Watch Topic
  • New Topic