I suspect LL and BB's answers are most appropriate to the question. MM's approach is useful if you want to be able to access all instances that have been created, rather than just talk about a particular instance. A couple corrections though:
There's no opint in synchronizing on "this". Inside the constructor, no other
thread can possibly have a reference to the same "this" object that's being constructed - the reference won't be made available until the constructor completes. (Well, unless you intentionally pass a reference to another thread from within the constructor, but you'd have to be kind of insane to do that.) What you
do need to synchronize here is the access to the List "children", which is shared by all instances and thus may be accessed concurrently:
Also it's necessary to synchronize any other access to the List:
The getChildren() method is problematic - it should probably be synchronized, but more importantly any subsequent use of the List should be synchronized. Or we could just return a copy, so we don't have to worry about subsequent synchronization: