Course Content

Course Content


Key value pairs are used to hold the initialization parameters. They're in the init-param tags of the web.xml file. The param-name tags are used to specify the key, while the param-value tags are used to specify the value. The ServletConfig object is used to retrieve servlet initialization parameters.

Servlet init parameters are defined for each servlet within the element. Each servlet has its own set of parameters. They are available as arguments in the servlet's init function. This will be used to load values into the servlet for the first time.

Every variable should be correctly initialised, according to Java designers. Giving a variable a correct beginning value is called initialization. It's so critical that Java either does it for you or tells you that an error has happened and that you need to initialise a variable.

However, if you declare an instance variable static and final, the Java compiler will not initialise it in the default function Object() { [native code] }; thus, static and final variables must be initialised. If you don't, you'll get a build time error.

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere