Sunday, 13 August 2017

JAVA PROGRAMMING DATA TYPES

The int method is called only once. It is called only when the data type is created, and not called for any user requests afterwards. So, it is used for one-time to initialize the data, just as with the init method of applets.
The data is normally created when a user first invokes a URL corresponding to the servlet, but you can also specify that the data be loaded when the server is first started.
When a user invokes a servlet, a single instance of each servlet gets created, with each user request resulting in a new thread that is handed off to doGet or doPost as appropriate. The init() method simply creates or loads some data that will be used throughout the life of the servlet.
The init method definition looks like this:

ex:
public void init() throws DataException {
  // Initialization code...
}
The service() Method The service() method is the main method to perform 

4 comments:

OPERATERS

"Don't Review Skip": Fans Troll Tim Paine For Poor DRS Challenge On Day 3

India vs Australia: Tim Paine was again in the firing line as his poor DRS call against Mayank Agarwal cost Australia a review on Day 3 of t...