Given the code fragment:
What output will be returned when this servlet is called a GET request?
Given the code fragment:
What output will be returned when this servlet is called a GET request?
When a servlet receives an HTTP GET request, the `doGet` method is called by the `service` method to handle the request. The `service` method in the `HttpServlet` class is responsible for dispatching requests to the appropriate methods, such as `doGet` for GET requests, `doPost` for POST requests, etc. Since the `doGet` method is explicitly overridden and prints 'Get() method called.', that will be the output when the servlet handles a GET request.
Answer A. Override service method disable all other Request handling methods.