Define block in java.

BLOCKS IN JAVA:—————————————————————————–

  • A block  is a set of instruction define in curly braces ({}) block doesn’t have any name so you cannot invoke the block explicitly  . block  doesn’t   have any  name so you cannot invoke by the jvm automatically.
  • Blocks define inside the class directly as member are called as intilization block.
  • there are two types of initialization block.
  • 1.Instance initialization block(IIB)
  • 2.static initialization block.(SIB).
  • Instance initialization block(IIB)——————-

Block define inside the class directly without static modifier is called as instance initialization blocks.


will be invoke by the jvm automatically after initializing the object .

  • creating object is necessary in IIb.
  • how much time we create abject then the same no of time of the IIb is called.
  • IIb is called when the class of object is created.



// IIB block






Introdcution of Servlets..

Defination of servlets.

Servlet are the modules that run inside request/response oriented services .such as java enabled web servers.

AS they are java based they are more platform independent.


processing data passed over https using on html form ,including purchase order.

Allowing collection between people a servlet can handle multiple requests concurrently they can synchronizerequest to support system such as on line conferencing .

forwarding requests servlets can forward requests to other services and servlets.

different methods of servlets.:—–

1.doGet():-  for handling get .conditional get requests

2.dopost():- for handling post requests . put():-for handling put requests. Delete():- for handling delete requests