Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Xiao Song

+ Follow
since Aug 29, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Xiao Song

Which statement is true?
A. The Mycircle class is fully encapsulated.
B. The diameter of a given MyCircle is guaranteed to be twice its radius.
C. Lines 6 and 7 should be in a synchronized block to ensure encapsulation.
D. The radius of a MyCircle object can be set without affecting its diameter.

I think the right answer is D, am I right?
thanks advance!
[ November 24, 2006: Message edited by: Barry Gaunt ]
Code as follows:

Why there is no output? What does setDeamon() do?
Thanks advance!

After compile, it said "i has protected access in p1.A" in line 15.
Why, B is subclass of A, and member i in A is protected. in my opinion, subclss can access protected member of baseclass.
[ November 21, 2006: Message edited by: Barry Gaunt ]
Thanks Burkhard Hassel, His explonatio is very clear.
Thanks a lot.
In rt.jar NaN is defined as follows:

A constant holding the largest positive finite value of type
double,It is equal to the hexadecimal floating-point literal
0x1.fffffffffffffP+1023 and also equal to

What is this mean??
Hello,everyone, Why the result is false??

Thanks advance!!
thanks to Neelesh, I have read your reply, and it made me clear.
the following code is the defination of the Object.equals():

It uses "==", if class Value don't override equals(), and "v1.equals(v2)" is just the same as "v1 == v2", the result is "false" without question.

am I right?

thanks all.
Hi,all. Why equals() can not treat class Value and Integer the same?

[ September 07, 2006: Message edited by: Xiao Song ]
Xiao Song is dog two, hope you like my new name.
[ September 07, 2006: Message edited by: Xiao Song ]
i tried.
if x ge 9, output is 9;
if x lt 9, output is 0

you are right, i was wrong.