File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Mock Question on EJB-QL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Mock Question on EJB-QL" Watch "Mock Question on EJB-QL" New topic

Mock Question on EJB-QL

Vipin Mohan
Ranch Hand

Joined: Nov 15, 2003
Posts: 79
hi friends

The answers are given as A and E for this question. Shouldn't it be B and D.
Select all pattern values of a LIKE expression that would identify a word starting with a �J� and having �on� as the last two characters.

A. �J%on_�
B. �J*on%�
C. �J%on*�
D. �J_on%�
E. �J%_on_�

Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
% means more than 0 characters, i.e. any characters that can be appended at the end of the searching keyword.

_ means exactly 1 character, and thus, there is only 1 character that can be appended at the end of the searching keyword.

But I guess the question has some problems. What is the meaning of the last 2 characters? I feel it is meaning the 2nd last and last characters are 'on', and thus, it should be 'None of the above'.


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Valentin Crettaz
Gold Digger

Joined: Aug 26, 2001
Posts: 7610
% means more than 0 characters

Actually, % means 0 or more characters, that is % can stand for an empty sequence of characters (EJB spec section

As for the wording you are totally correct, it should say something like
"...having 'on' as the last two but one characters"
I apologize, this is my mistake since it is one of the questions I wrote for Whizlabs SCBCD exam simulator I'll tell them to correct that. Thanks for pointing this out

[Blog] [Blogroll] [My Reviews] My Linked In
I agree. Here's the link:
subject: Mock Question on EJB-QL
It's not a secret anymore!