Among following, which class/interface refers to the Application level scope:

  1. ServeltRequest

  2. HttpSession

  3. ServletConfig

  4. ServletContext


Correct Option: D
Explanation:

To answer this question, the user needs to know about the different levels of scope in Java web applications.

ServletRequest refers to the request scope, which is the smallest level of scope and lasts only for the duration of a single request.

HttpSession refers to the session scope, which lasts for the duration of a user's session with the web application.

ServletConfig refers to the servlet configuration scope, which is used to pass initialization parameters to a servlet.

ServletContext refers to the application scope, which is the largest level of scope and lasts for the duration of the web application.

Therefore, the correct answer is:

The Answer is: D. ServletContext

Find more quizzes: