jQuery in Action, 3rd edition
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes mock exam question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "mock exam question" Watch "mock exam question" New topic

mock exam question

harikumar devandla

Joined: Nov 26, 2004
Posts: 10
which of the following statements are correct regarding the code?

<jsp:useBean id="name" class="java.lang.String" />
<%= name %>

1. wont compile
2. It is valid jsp line and it ll print the variable called name
3. It ll compile but produce null as the output
4.It ll work if u create a javabean class with only one variable of type java.lang.String

Can anyone help me with this question.?

Nitish Bahadur
Ranch Hand

Joined: Aug 25, 2003
Posts: 118
I am inclined to say none of the above. It will compile and print blank as the output.
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3322
Well, it may be assumed answer 4) - every bean must have unique name in its scope.


Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz
Exam 1Z0-810: Upgrade to Java SE 8 Programmer Study Guide and Quiz
I agree. Here's the link: http://aspose.com/file-tools
subject: mock exam question
It's not a secret anymore!