• 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

I need an explanation on this...

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
reply
    Bookmark Topic Watch Topic
  • New Topic