This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Servlets and the fly likes I need an explanation on this... Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "I need an explanation on this..." Watch "I need an explanation on this..." New topic
Author

I need an explanation on this...

mocca az
Ranch Hand

Joined: Mar 07, 2001
Posts: 93
I got my answer to this and i was right...
Which of the given statements are correct regarding the following occuring in the same .jsp file?
1. <%! int sum = 0 %>
...//code
2. <% int sum = 0 %>
a) Both can't go together in same JSP file
b) The JSP file will compile properly even if one of them is removed
c) 1 is a declaration and 2 is an expression
d) 1 is a directive and 2 is a scriplet
e) 1 is a declaration and 2 is a scriplet
Correct answers are a and e. I say none of it is correct since semicolon are missing, therefore it won't compile. Disregarding that i agree with e, but not with a. I created exact same page and it compiled fine...
Anybody???
[This message has been edited by mocca az (edited September 16, 2001).]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: I need an explanation on this...
 
Similar Threads
JWeb+ Question
JavaRanch SCWCD Mock -- need to adjust a few answers
Eduardo Cobian Mock exam doubt
How to use JSTL varraible in to jsp
help me to solve this assignments..