I think init blocks are used when you have alot of things to initialize at one time. It makes the code clearer to the reader if they can look in one place for all the initialized things instead of having to look through the code to find each individual one.
Not with anonymous classes you can't! Regards, Manfred.
John M. Gabriele
Joined: Feb 18, 2001
hmm... i could still init a bunch of things right in the first constructor i write and then put this() (if i wrote them in a no-arg) calls in the other constructors. someone perusing the code could see the this() call and then go back and hunt for the constructor with the same signature as the this() call to find the initializations... maybe the init block is used to avoid this kind of "hunting" (even tho it doesn't seem so bad to me...)?