Results 1 to 6 of 6
  1. #1
    tghn2b is offline Member
    Join Date
    Jan 2008
    Posts
    31
    Rep Power
    0

    Default beware of $-NZ-700 courseware for SCJA

    About a month ago I purchased courseware for Sun SCJA exam it cost me in New Zealand just over $700

    I brought to the attention of the New Zealand agent who ......

    the question
    Identify the statement that adheres to type casting guidelines
    (1) int appleCount = (long) orangeCount
    (2) long appleCount = (int) orangeCount
    (3) short appleCount = (int) orangeCount

    I went for (2) as (1) goes from a 64 long to a 32 bit int
    and (3) goes from a 32 bit int to a 16 bit short
    OK the choice (2) I made was correct but the reason was wrong

    Feedback:
    Correct The statement is conventing a Long value into a Int Value

    THIS IS WRONG IN MY OPINION AS IT DOES THE REVERSE IT CONVERTS A INT INTO A LONG


    MY SECOND ERROR I FOUND


    Identify the correct statement about the do/while loop
    (a) The body of the loop is processed if the expression returns true.
    (b) The body of the loop is processed at least once.
    (c) The body of the loop is processed if the expression returns false.

    I WENT FOR OPTION (B) AND GOT
    Feedback:
    Incorrect


    IT APPEARS "THEY" THINK OPTION (a) IS THE CORRECT OPTION

    AM I LOSING IT? OR IS THE COURSEWARE TRYING TO CONFUSE THOSE WHO WASTE MONEY BUYING THEIR COURSEWARE?

  2. #2
    tghn2b is offline Member
    Join Date
    Jan 2008
    Posts
    31
    Rep Power
    0

    Default

    From http:
    //en.wikipedia.org/wiki/Do_while_loop

    First, the code within the block is executed, and then the condition is evaluated. If the condition is true the code within the block is executed again.



    I forgot about google I was so blown away by the mistakes It put me off learning more.
    Last edited by tghn2b; 12-24-2008 at 06:02 PM. Reason: see all of the above, unable to post link 8-(

  3. #3
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    7

    Default

    Not sure about the first question, but my vote on the second one is:
    (a) The body of the loop is processed if the expression returns true.
    Why? The "while" statement has to be true for the loop to be executed. If it's false then the loop doesn't execute (which eliminates (c)). There is no requirement as to how many times/loops a do/while should loop... it could be 0 or it could be 10,000... it depends on the conditions within the loop (so that eliminates (b)).

    Luck,
    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  4. #4
    tghn2b is offline Member
    Join Date
    Jan 2008
    Posts
    31
    Rep Power
    0

    Default

    CJSLMAN you are absolutely right with what you say .............. I agree this is what a while loop should do ...................... but if you look at the question more closely this is a " do/while " loop

    Sorry for that.

  5. #5
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    7

    Default while vs do/while

    I see your point. So I went to the Sun tutorials, and the difference between the while and do/while loop is stated as:

    The difference between do-while and while is that do-while evaluates its expression at the bottom of the loop instead of the top. Therefore, the statements within the do block are always executed at least once.

    The while and do-while Statements (The Java™ Tutorials > Learning the Java Language > Language Basics)

    So answer b) would be correct and that also makes your answer correct.

    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  6. #6
    tghn2b is offline Member
    Join Date
    Jan 2008
    Posts
    31
    Rep Power
    0

    Default

    OK I am a total moron then (on the first question)


    either that or some of you people write code like
    13 = int maxNumber;
    or
    x = y;
    were y becomes the value of x

    sometimes I just dont about some people who do java
    I was at some other forum people claim all the time they get between 90% and 99% in the Sun java exam,
    You ask them a very basic question that obviously is not a multiple question like the one on the test and they dont know anything.


    No doubt these people are working for sun making educational courseware.

Similar Threads

  1. Anyone selling SCJA training material? Your OLD stuff?
    By KMN in forum Reviews / Advertising
    Replies: 2
    Last Post: 08-24-2009, 05:58 PM
  2. Need a voucher for SCJA Exam CX-310-019
    By sunilarava in forum Java Certification
    Replies: 2
    Last Post: 08-23-2009, 02:56 PM
  3. SCJA Certification
    By techie.it19 in forum New To Java
    Replies: 0
    Last Post: 10-16-2008, 09:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •