This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Hi Cherry, A static member belongs to the class. Guarantees that only one copy of the member will exist. There's really no need to allow the use of static in an inner class. If you need such a member, you can just as easily define it in the outer class as you can only create an inner class object if you already have an outer class object. Constructors are used to create instances of the class. Not sure why you would need to synchronize the creation of an object; usually you synchronize to ensure an object is only updated/modified by one thread at a time. Hope that helps. ------------------ Jane The cure for boredom is curiosity. There is no cure for curiosity. -- Dorothy Parker
i got the answer why constructors cannot be synchronized thatz bcos v didnt create an object then how can u synchronized on the object but still im not clear why a non-static inner class cannot have a static members. if v have a static member v can hide it from the outer class and also let inner classes access it . waiting for a reply bill any answers