Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

more tease

 
ersin eser
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope did not take the test yet ( busy busy busy )
1-----------------
which one is a valid expression?
<%= /* testing */ %>
<%=%>
<%= %>
2---------------
how about this, is it valid ?
<%@page import="java.util.List, java.awt.List" %>
3---------------
how about this, is it valid ?
<%@page buffer="none" autoflush="false" %>
4-----------------

is it going to compile ?
a.jsp as follows
<%@include file="b.jsp" %>
b.jsp
<%@page language="JavaScript" %>
<%! int i = 10; %>
5-----------------------

is it going to compile ?
a.jsp as follows
<%! int j=0; %>
<%@include file="b.jsp" %>
<%= ( i<j) ? "less" : "great" %>:
b.jsp
<% int k = j; %>
<%! int i = 10; %>
6-------------
from related.tld ( assume that missing part is OK )
<tag>
<body-content>empty</body-content>
</tag>

which is/are valid tag usage for this tld
1<jR:emptyTag></jR:emptyTag>
2<jR:emptyTag> </jR:emptyTag>
3<jR:emptyTag/>
7-------------
is it valid ?
<%= page.getServletInfo() %>
[ February 04, 2002: Message edited by: ersin eser ]
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK - Ill' bite:
Q1 - I do not answer because it is "none of the above".
Q2 - Valid to separate classes by commas? Sure. With these two particluar classes, no. "List" is ambiguous at compile time. An SCJP2 question really.
Q3 - No, "autoflush" is an invalid attribute for the page directive. Correct spelling is: autoFlush. If you make that change, you get another error: invalid combo of buffer/autoFlush
Q4 - No, only scripting language currently allowed is "java".
Q5 - Yes, compiles and runs. Generated java code is informative.
Q6 - A (WA)guess: 1 & 3.
Q7 - No, method not found. Specs say interesting stuff: "page" is equivalent to "this" in the body of the page.
........
(Hope I got the Q #'s in order .... )
Well, I bought the voucher today....
Later, Guy
 
Srini Admala
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good one ersin !
I totally agree with Guy.
BTW, I have been closely following all the threads and but have busy with my prep & work. I'm taking the test on 02/19.

Best of luck to both of you.
-Srini
 
R K Singh
Ranch Hand
Posts: 5384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Guy Allard:

Q2 - Valid to separate classes by commas? Sure. With these two particluar classes, no. "List" is ambiguous at compile time. An SCJP2 question really.

Just coming to this forum.... not know much... abt to start reading core... and them more.
So ...
for Q2.. I think it is valid till while using them we do use it with full qualified name.
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

for Q2.. I think it is valid till while using them we do use it with full qualified name.

Nope, it will be a compile time error due to ambiguity.
- satya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic