Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

# Xiao Song

Greenhorn
since Aug 29, 2006
Cows and Likes
Cows
0
In last 30 days
0
Total given
0
Likes
0
0
Total given
0
Given in last 30 days
0
Scavenger Hunt
Ranch Hand Scavenger Hunt
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?
[ November 24, 2006: Message edited by: Barry Gaunt ]
15 years ago
thanks all..
15 years ago
15 years ago
Where is a??
15 years ago
Code as follows:

Why there is no output? What does setDeamon() do?
15 years ago

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 ]
15 years ago
Thanks Burkhard Hassel, His explonatio is very clear.
15 years ago
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
Double.longBitsToDouble(0x7fefffffffffffffL)

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

15 years ago
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.
15 years ago
Think you Carlos,
15 years ago
Hi,all. Why equals() can not treat class Value and Integer the same?

thanks!
[ September 07, 2006: Message edited by: Xiao Song ]
15 years ago
Xiao Song is dog two, hope you like my new name.
[ September 07, 2006: Message edited by: Xiao Song ]
15 years ago
i tried.
System.out.println(s.lastIndexOf("two",x));
if x ge 9, output is 9;
if x lt 9, output is 0

you are right, i was wrong.
15 years ago