• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

hello everyone plz help me :)

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know
thanks for telling me!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic