Multiple choice

Which of the following is/are correct about the getAttribute method and the getAttributeNames method in the Servlet?

  1. The getAttributeNames method returns the enumeration of Strings representing the names of the attributes and getAttribute method returns the objects bound to that name.

  2. The getAttribute method returns an integer representing the minor version of the Servlet API.

  3. The getAttribute method stores an object in the servlet context and binds the object to a given name.

  4. The getAttribute method returns the Servlet API.

  5. Both (1) and (2)

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

This is the correct statement.