js yang

Ranch Hand
+ Follow
since May 09, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by js yang

I have taken the SCJP exam and found that the Exam Cram practice questions were harder than the actual exam. BTW, I got 84% on the final exam at the back of the Exam Cram book and got 91% on the actual exam.
22 years ago
I personally use Forte which makes building GUI's very easy. The bonus is that Forte is a free download from Sun.com
Just out of curiosity, why do people who disdain Java bother to come to Java bulletin boards? Don't they have anything better to do?
22 years ago
Great job, Roger! If you had the determination to take the test three times, you have the determination to accomplish anything.
22 years ago
Gaurav, I took the exam a month ago. The exam tells you exactly how many questions are right for each question. Also, it is true that the actual certificate does not show your score. However, a high score allows you bragging rights on your resume.
[This message has been edited by js yang (edited July 06, 2001).]
22 years ago
When I took the SCJP exam last month, I had several questions that were very similar to JQPlus questions.
BTW, both abstract classes and interfaces cannot be instantiated.
Keep in mind that .5 rounds up to the next highest inter. For example, 1.5 will round up to 2. So, what will -1.5 round up to? -1 and not -2 because you are rounding the number to the next highest integer--which is -1 and not -2.
oops...Cindy beat me by 2 minutes. What she said is correct.
[This message has been edited by js yang (edited June 10, 2001).]
Good question. I know for sure that wait() will cause a thread to give up the monitor, and that sleep() will NOT cause a thread to give it up.
However, I am unsure about yield(). I think that a thread that yields will not give up a monitor. After all, if threadA has the monitor, and the JVM schedules threadB for execution, threadA does not lose the monitor. So, why should a yielded thread give the monitor?
When I first started programming, coding seemed impossibly hard. My first attempts were indeed frustrating--my code was filled with syntax errors. However, over time, you realize that it really is not that hard. All it takes is practice. My suggestion would be to just jump in--write a lot of short snippets of code. Over time, I think that you'll find that your codophobia will get better.
22 years ago
Congratulations, you are now a SCJP! The score doesn't matter, what is important is that you passed--which is an achievement in of itself.
22 years ago
Shah, running your exact code on JDK 1.3, my compiler gave an error, stating that there is an unreachable statement in my code.
Anyway, were you intending to use the final static boolean b in the while loop? The following code gave me a compiler error about the unreachable statement:

However, the following code( where the boolean is not final ) did not give a compiler error:

I agree with Micah--you can declare the same variable so long as it is within another scope. Thus, it is okay if the same variable is redeclared with each pass of the while loop.
I don't think that anyone has satisfactorily explained this puzzled.
Sona Nagee wrote that: "in this the scope of k is clearly defined as being the main method but in other case the scope of k is undecided for the compiler." My question is why is the scope of k undecided in the following code:

Isn't the scope of k defined? The scope of k lasts with each pass of the while loop.
Anyway, I hope that someone can shed some light on this puzzle.
Gsoysal, great job!
22 years ago
Here is an example of accessing String childName:

Hope this helps.