tao wu

Greenhorn
+ Follow
since Sep 18, 2004
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 tao wu

Thank you for Henry and Barry's help.i understand.
Thank you.I have understand part of them.
Is you mean
The second case you list is we wanted usually.
The first case (use sleep or join...)the result is wrong,they can't get the "totol=",is that means in the case that notify exec before wait will be dangerous,this programme would be frozen for ever?
If this case will happen possibly ,how to prevent it?

Thank you!

[ December 10, 2004: Message edited by: Jonathan Schwartz ]

(shortened comment lines and fixed indententation)
[ December 10, 2004: Message edited by: Barry Gaunt ]
java synchronize

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

java synchronize >t.txt

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

Why ?



(Added [C0DE][/C0DE] tags and applied formatting)
[ October 12, 2004: Message edited by: Barry Gaunt ]
Sashi
( 4.All methods defined in List are also defined in Collection ) is wrong .
You can see from API doc
[ September 29, 2004: Message edited by: Jonathan Schwartz ]
class hi is public and class hoi is public
Is this reason ?
[ September 29, 2004: Message edited by: Jonathan Schwartz ]


Code from j2dk1.4.2

I think answer is A,E