Confusing SCJP 6 mock exam questions

Given:
*class StringSplit {*
*public static void main(String [] args) {*
String s = "x1234 y56 z7 a";
String [] sa = s.split("\d");
int count = 0;
for( String x : sa)
count++;
System.out.println("total: " + count);
What is the result?
The "correct" answer for this question on the guide I'm using is 8.
I chose "Compilation Fails" based on my prior experience with other mock exams because some questions like these say that \d needs an extra \ (so \\d). For crying out loud, I even tested this code and it failed due to the missing escape.
Anyway, when I run into this type of question on the SCJP, and there's something like \d or \w or \s showing up, should I assume that it's a valid delimiter or assume that it's not escaped properly?
Thank you.
Edited by: lapchern on Feb 1, 2010 10:31 PM
Edited by: lapchern on Feb 1, 2010 10:34 PM

please, edit your question and use the tag (there is a button in the editor window)                                                                                                                                                                                   

Similar Messages

  • Java Mock Exams

    I want to obtain Java mock exam questions. Can anyone help me ?

    Go to JavaRanch's mock exam site (http://www.javaranch.com/mock.jsp)
    They have an entire section of some really good mock exams. Marcus Green's tests are very good, the site also has a "Rules Roundup" game that tests you on Java rules.
    Using the mock exams and Bill Brogden's "Exam Cram" (I understand it is no longer published - publisher went out) I recently achieved my SCJP....

  • Is there AWT questions in SCJP 1.5 exam?

    Is there AWT questions in SCJP 1.5 exam?
    In official exam description there is no mentioned about AWT.
    In Sybex certification guide, 5th edition, AWT also plased out of SCJP section.
    but some mock exams contains quite a lot of AWT questions.
    e.g. http://www.jchq.net/mockexams/exam1.htm
    Could people who passed the SCJP test tell me the real facts about AWT ?

    Is there AWT questions in SCJP 1.5 exam?
    In official exam description there is no mentioned
    about AWT.I don't think AWT is an issue, either. I'm not even sure whether Swing is a part. AWT is outdated ever since Swing was integrated in 1.2.

  • Needed Latest  SCJP 1.4 exam pattern +question papers

    Hi,
    I'm taking up SCJP 1.4 exam on 13th Oct.
    Could you please suggest websites for/ send the Latest SCJP 1.4 exam pattern and question papers for me ?
    Thanks and Regards,
    Sanjeev Kulkarni

    Darryl.Burke wrote:
    From the UK:
    Durham University's page on SLAC-HEPNAMES database of EMAIL-IDs in HEPDATA
    {color:#0000ff}http://durpdg.dur.ac.uk/HEPDATA/ID{color}That line is only in the title. The text says
    worldwide directory of email addresses
    >
    From the US:
    University of California's page on Mail ID Name Changes
    {color:#0000ff}http://email.ucdavis.edu/forms/mailidnamechange.php{color}They use MailID (not email id, is an internal identifier) and the text says
    change in your email address then after your old email address expires
    >
    >
    University of North Carolina's page on UNCW E-mail ID Retrieval
    {color:#0000ff}https://appserv02.uncw.edu/dasapps/sec/getid.aspx{color}Once again, Email-ID is again an internal term refering to the use of an email address as a logon id.
    The text, once again, says
    UNCW e-mail username (your e-mail address without the @uncw.edu)
    >
    From Belgium:
    Username: (Email ID) on
    {color:#0000ff}http://customer.netline.be/{color}
    Once again, I see this more as simply an internal reference to an email used as a logon id (so a composite term).
    Madison Area Technical College's page on Student Network/Email ID Choices
    {color:#0000ff}http://matcmadison.edu/matc/studentresources/studentemail/about.shtm{color}
    From page
    {color:#0000ff}http://www.abitmore.be/ssr2001/w3warecb.htm{color}
    ... ... like: change in eMail ID, ... ...
    These site seems to be using like you feel (although the first does not contain enough context to be sure), but they, and every other site listed here, is hardly definative.
    Edit: This is not to be combative, so please don't take it that way. Just expanding on my viewpoint.
    ;-)

  • Mock exams for 1Z0-047

    Does anyone know of any official mock exams for the SQL Expert exam (1Z0-047)? All I can find are dodgy brain dump sites...
    Also how realistic are the questions in the Master Exams that come with OCA Oracle Database SQL Certified Expert Exam Guide (Exam 1Z0-047) (Osborne Oracle Press Series) - Steve O'Hearn? The questions at the end of each chapter seem far too simple to me and are much easier than the 7 or so sample questions on the Oracle page for this exam. Any thoughts from those who have taken the exam and used this book?
    Willy

    WillyM wrote:
    Does anyone know of any official mock exams for the SQL Expert exam (1Z0-047)? All I can find are dodgy brain dump sites...
    Wll Kaplan the official Oracle Partner appears to be offering them here ....
    http://certification.oracle.com - Preparation - Practice Tests .....
    http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=208
    Also how realistic are the questions in the Master Exams that come with OCA Oracle Database SQL Certified Expert Exam Guide (Exam 1Z0-047) (Osborne Oracle Press Series) - Steve O'Hearn? The questions at the end of each chapter seem far too simple to me and are much easier than the 7 or so sample questions on the Oracle page for this exam. Any thoughts from those who have taken the exam and used this book?What follows if thru memory
    ( The questions the the end of the first few chapters are trivial ... they then become more relevant ).
    Well I found the book helpful and from what I can remember the practice tests helped point some gaps I had.
    Typically I think I find real exams sometimes need a bit longer than that on some of the practice tests.
    I personally only use practice tests when i think i have learnt all material as a check to where i'm at and to identify gaps.
    I will even leave the end of chapter tests under i think i have grasped everything.
    And I will never take end of chapter tests if i have read that chapter earlier in the day!
    ( If i get tempted must take end of chapter tests early then i choose a reasonably meaty chapter about 1/3 into the book).
    The book was enough for me .... but it may not be so for everyone ... we can be different and start from different places.
    Someone mentioned they got rhu the test easily in an hour .... well i was pushing time the whole way through!
    >
    WillyRgds

  • New Version of Mock Exam

    The new version of my mock exam for the Java Programmer Certification is available at the URL that appears at the end of this post. The new version has a set of two Basic Exams and also a set of 144 questions distributed across ten topic specific exams and alternatively organized as a set of eight comprehensive exams.
    This new version has 43 new questions relative to the old version. Most of the new questions are concentrated in three new topics: Constructors, Strings, and StringBuffers. The three new topics can be found on the Topic Exam page or you can find all 43 questions organized as a set of two exams on the New Questions page.
    My exams are very difficult. First time visitors are encouraged to start with the set of two Basic Exams. Try the Topic Exams next and use them as you work through your study guide chapter-by-chapter. For example, if you complete a chapter that covers inheritance, then try the Inheritance exam. The Comprehensive Exams should be saved for last. Those that have already completed my exams should try the New Questions page.
    The answer pages contain explanations for the answers and links to reference materials such as the Java Language Specification and a link back to this message board.
    My home page contains a set of exams organized by date. Always use the latest version since the older versions may be deleted without notice.
    http://www.geocities.com/danchisholm2000/

    I have a question for those on this message board that are certified java programmers. Do you feel that studying for the exam was a valuable learning experience? Can you give an example of something interesting that you learned while studying for your certification?

  • SCJP 1.5 sample questions

    Please let me know, If anyone have SCJP 1.5 sample questions. I already learned to this exam.All though, I need more questions to test SCJP knowledge myself.

    This topic was posted in the wrong forum. See
    http://forum.java.sun.com/ann.jspa?annID=14

  • Scjp 1.5 exam details

    I am planing to take scjp 1.5 exam. Can someone tell me the details about the exam. How many questions will be there , what is the time allowed & what is the pass mark of the exam.
    Please let me know from where I can get any further details, example questions.
    Thank you...

    Interested in taking the Cisco [642-901 exam |http://www.pass-guaranteed.com/642-901.htm] our [642-901 practice exams |http://www.pass-guaranteed.com/642-901.htm] and study questions are composed by experts, who use their experience in preparing you for your future in Cisco.
    Pass-Guaranteed is the one of the best site for passing the Cisco exam.
    Pass-Guaranteed also offers you [642-642 test exam|http://www.pass-guaranteed.com/642-642.htm], [640-802 exam question|http://www.pass-guaranteed.com/640-802.htm], [640-816 practice exam|http://www.pass-guaranteed.com/640-816.htm], [642-812 dumps |http://www.pass-guaranteed.com/642-812.htm]

  • BW 3.5 Exams questions

    I am just new to BW. Can anyone guide me to get few sample or mock BW 3.5 Exams questions?
    Regards

    Hi,
    Check if these help :
    http://www50.sap.com/useducation/certification/curriculum.asp?rid=420&vid=5
    http://www.sap.com/uk/services/education/courses/bw.epx
    http://www50.sap.com/useducation/curriculum/print.asp?jc=1&rid=285
    http://www50.sap.com/useducation/curriculum/print.asp?jc=1&rid=458
    http://www50.sap.com/useducation/certification/examcontent.asp
    http://www50.sap.com/useducation/certification/curriculum.asp?rid=506&vid=5
    http://www50.sap.com/useducation/certification/curriculum.asp?rid=420
    threads discuss exam
    BW Certification Preperation
    BW CERTIFICATION 3.5
    Re: SAP BW Certification
    /thread/49323 [original link is broken]
    BW certification
    Also suggest you to go through help.sap.com and the threads on SDN. The best way would be to get your hands on a BW 3.5 system and play with it for 2-3 months. That would be your best preparation.
    Cheers,
    Kedar

  • Exam question - follow-up point

    Have now resolved the previous coding problem...many thanks to all who helped and aided my understanding.
    as a follow-up question -
    is it possible to reference "Sets" as an object in a "Map"
    the exam question requires a "Map" to be created referencing a String "studentName" and the collection of books that the "student" has read (see previous coding question - http://forum.java.sun.com/thread.jspa?threadID=5196761)
    current code is as follows (the Map studentRecords has previously been referenced as a private instance variable):-
    public void createReadingRecords()
    String studentName;
    Set<String> booksRead = new HashSet<String>();
    do
    studentName = (OUDialog.request("Please input the student name or * to finish","));
    while
    (!studentName.equals("*"));
    booksRead = this.collectBooksRead();
    studentRecords.put(studentName,booksRead);
    }

    The Set is the "value" of the map, which is stored under a "key", which is the student name. You can use the get(key) method of the map to retrieve the value associated with that key, or you can get a collection of all the values with the values() method.

  • REQ SAP FI MODULE- CERTIFICATION EXAM QUESTIONS AND ANSWERS

    REQ SAP FI MODULE- CERTIFICATION EXAM QUESTIONS AND ANSWERS
    Moderator: We should be thankful that you don't require to solve the exam for you

    Please type "certification" in the search field, you can find many threads regardding this.

  • Microsoft Exam Questions On Functionality That Doesn't Work!

    What does a student do if they are tested, in a Microsoft exam, on functionality that's known not to work?!
    It seems absurd that Microsoft is doing this.

    Assume it does work when you take the exam.
    How can functionality that doesn't work outside of the exam suddenly and mysteriously work in the exam? that doesn't make sense!
    Turn a blind eye toward "real world" experiences in these types of cases.
    Turning a blind eye to functionality that doesn't work isn't the correct solution: fixing the software or removing the question
    from the exam is.
    Be sure to mark the exam questions that you disagree with.
     - and what happens if the student concerned did not think to do this at this time but only after she had time
    to think about it afterwards?
    Thank you for your contribution but I feel that it does not really address the problem I have highlighted.

  • BI - Exam Questions & Tips

    Hai Friends
      I am going to take BI Certification Exam next Week. If any one has got model exam questions or tips about the exam, please write to me at
    [email protected]
    Thanks in advance
    A.Bharath

    Steve,
    The forum is full of threads on Certification (Just do a search on those key words and you will get myriads of results).
    I was wondering however what is the value of a BW 3.0 certification.
    BW 3.0 is an outdated version, and i am skeptical about its value in the labour market.
    I would opt for either a BW 3 .5 or a NW2004S (if you have experience on this version) certification.
    Hope it helps (points are welcome),
    Gili

  • Oracle 1Z0-242 Exam Questions (PeopleSoft Application Developer II )

    Folks,
    Hello. I am working on 1Z0-242 exam. I have freely downloaded the exam questions for PeopleCode and Application Engine. But I cannot find any questions for Integration Tools.
    Do any folks know where to freely download 1Z0-242 exam questions for Integration Tools ? Or, do any folks have taken 1Z0-242 exam and have a copy of 1Z0-242 exam questions ? Please let me know.
    Thanks in advance.

    Hi,
    Did you get all the Q&A for this exam? Could you please share what you got for free?
    or you can tell me where to download from.
    Thanks,

  • Mock exams for Oracle EJB cerficication (CX-310-093)?

    Hello,
    Can you please help me by posting existing commercial or free mock exams for CX-310-093?
    The full name of the certification is: Oracle Certified Expert, Java Platform, Enterprise Edition 6 Enterprise JavaBeans Developer
    Thanks

    875304 wrote:http://www.epractizelabs.com/certification/sun/oce-ejb-exam-6.html
    You can try Java EE 6 EJB OCE Certification Training Lab.
    Please when suggesting material give some indication of the material's providence and your providence
    (ie are you a spammer or forum points seeker).
    As it happens certguard.com regards www.epractizelabs.com as certifcation safe (at least when last verified 2008) at time of post.
    This post looks like spam ... however your other two current posts indicate you appear to be something other than a spammer ... just and only just.

Maybe you are looking for