• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Mock Question on EJB-QL

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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_�

Thanks
Vipin
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
% 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'.

Nick
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
% means more than 0 characters

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

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
 
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic