# Thread: beware of \$-NZ-700 courseware for SCJA

1. Member
Join Date
Jan 2008
Posts
31
Rep Power
0

## 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. Member
Join Date
Jan 2008
Posts
31
Rep Power
0
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 07:02 PM. Reason: see all of the above, unable to post link 8-(

3. 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

4. Member
Join Date
Jan 2008
Posts
31
Rep Power
0
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. ## 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)

CJSL

6. Member
Join Date
Jan 2008
Posts
31
Rep Power
0
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.

#### Posting Permissions

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