More of them shifty bits
This Javaranch article is a decent tutorial on bit shifting. I do have a question for some people that have used this stuff. Lets say I have a ten character field that can be either Y or N. I suppose you could think of them as 1 and 0 as well. Anyways, what would be the best way to read these into a set of 10 boolean values? Right now I just use the following simple code:
myObject.setTrueFalseFieldn( myString.charAt(n)=='Y' );
and I repeat it 10 times. Any ideas on how to improve that code? Geez, you'd think I'm some kid straight out of college with this simple of a question...
Another post I had dealing with bits.
myObject.setTrueFalseFieldn( myString.charAt(n)=='Y' );
and I repeat it 10 times. Any ideas on how to improve that code? Geez, you'd think I'm some kid straight out of college with this simple of a question...
Another post I had dealing with bits.