File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes hello everyone  plz help me  :) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "hello everyone  plz help me  :)" Watch "hello everyone  plz help me  :)" New topic
Author

hello everyone plz help me :)

David Liu
Greenhorn

Joined: Apr 16, 2002
Posts: 24
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


It's better burn out than to fade away.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
"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


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
David Liu
Greenhorn

Joined: Apr 16, 2002
Posts: 24
I know
thanks for telling me!
 
 
subject: hello everyone plz help me :)
 
Threads others viewed
Map in Javascript
tough questions on JSP
Urgent Please : Whether WAS 4.0 supports Servlet 2.3 API ?????
Not able to get database connection???????
volatile and static keywords
IntelliJ Java IDE