Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hello everyone plz help me :)

 
David Liu
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
plz help me analyze this question
Assuming the rest of the code is valid,
identify true statement about this code?
public int doStartTag(){
try{
JspWriter out=pageContext.getOut();
HttpSession session=pageContext.getSession();
session.setAttribute("TestValue","Hi there");
String s=(String)session.getAttribute("TestValue");
out.println("" + s);
A It prints 'Hi there'
B It prints blank
C It prints 'Hi'
D It will not compile as HttpSession is an abstract class
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"shomaru"
Welcome to javaranch.com.
Please note our guidelines on names at http://www.javaranch.com/name.jsp
After reviewing that, please change your "Publicly Displayed Name" by modifying your profile.
Thanks for your cooperation.
- madhav
 
David Liu
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know
thanks for telling me!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic