Originally posted by Ernest Friedman-Hill:
You can assign directly to the variable "outerC" if it's a member variable of the enclosing instance. If it's a local variable, then you need to do a trick of some kind, because inner classes can only access final local variables. One thing you could do would be to initialize outerC like this:\
final Collection outerC = new ArrayList();
and then in the inner class, say
Collection students = DBFunctions.loadData(pb,productId,null,null);
outerC.addAll(students);
In my humble opinion, such a solution is a dirty hack. I'd first like to know more about *why* you want to "return" the value, to evaluate better alternatives...
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus