wood burning stoves
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Mock Exam Query 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 Query" Watch "Mock Exam Query" New topic

Mock Exam Query

Nilesh Raje
Ranch Hand

Joined: Aug 02, 2005
Posts: 153
Hi Friends,

I can acoss this Question in Mock exam on Jiris.com . Please help me

<%int [] nums={42,420,4200};
${5+3 lt 6}
${reuestScope['foo'][0] ne 10 div 0}
${10 div 0}

whats the Result

A) true true
B) false true
C) false true 0
D) true true Infinity
E) false true infinity
F) An exception is thrown
G) Compilation in translation Fails

Answer) E

THis is the answer given. This is Strange as in EL, null is handled gracefully as per Hfsj

Pls correct me IF I am wrong? Wat would be the right answer?

This is another question.

2)IF ELIgored property in XML is set to true then will any scripting or EL function that is enoucntered would be just ignored and displayed on JSP


if this is written in the JSP<b>${5*20}</b> then the output would be like
<b>${5*20}</b> or just ${5*20} or <b></b> or <b>100</b>
Which one is the right answer. I personaly feel out put would be ${5*20}

Thanks and Regards,<br />Nilesh<br />SCJP 1.4, SCWCD 1.4
Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

What stopping you from trying these out yourself ?

The first answer seems right to me. No where in the code does a null occur.

The second answer should be ${5*20} since it is EL that is being ignored not HTML.

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
I agree. Here's the link: http://aspose.com/file-tools
subject: Mock Exam Query
It's not a secret anymore!