This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: y a non_static inner class cant have static members