Question: is it possible to set the value of a Boolean after it has already been constructed? For example, suppose I create my Boolean like this: Boolean myBoolean = new Boolean(false); ..then later on in the code, I need to reset the value: if (x == y) { // Based on this condition, I need to set the booleanValue within the object to Boolean.TRUE } Thanks for any assistance, Rick <><
Wrapper classes like Boolean and the others are immutable, i.e. we cannot change the value they hold after having created them. The only thing you can do is create a new Boolean object and assign it to myBoolean. HIH ------------------ Valentin Crettaz Sun Certified Programmer for Java 2 Platform
Thanks so much for the info. This list is absolutely the greatest! I look forward to the day that I can actually help instead of always being the one that is helped! Rick <><
By being helped sometimes we do help Maybe others have the same question and now don't need to ask. Or we read a question and answer and file it away for later use.