This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Are we expected to memorize the API's of ServletRequest ..etc  RSS feed

 
Srikanth shetty Nukala
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While solving mock exams i came along a question which had the explanation saying: "the setAttribute() method is provided by ServletRequest and inherited by HttpServletRequest."

So for the exam are we expected to memorize the API's with each method signature??

It is expected to remember DD elements i suppose.

Thanks.
 
Akshay Kiran
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
YES!
not all but most of the important one you're expected to know.
 
Srikanth shetty Nukala
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey man thanks, will have to memorize the API's ...
 
Manikandan Jayaraman
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Srikanth, But we can do good logical thinking here to arrive at the answer, I suppose.

See ... Attributes could be part of ServletRequest interface itself irrespective of whether it is an HTTP flavour or not. This is because when you talk about a "scoping object" like request, we need to store attributes against it whether it is HttpServletRequest or ServletRequest. Got me?

Whereas consider setHeader(...), headers are inherent part of HTTP thus is unique method which is there in HttpServletRequest only.

Sessions are also inherent part of HTTP and so we dont have anything like Session and HttpSession interfaces.

Hope you got what I am saying ...

Nevertheless, memorising APIs is good

Regards,
Mani
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!