We have a class with many instances and run into memory problems. Therefore, we try to reduce the memory requirements of this class. One idea would be the following.
The class has many boolean instance variables, each of which would take up one word in a naïve implementation. One could think of combining them to a mini bit vector stored in an int, such that their combined memory requirement would be one word.
But I would suspect that the Java VM is doing this optimization anyways, such that performing it by hand would not get any additional savings. Right?