navrsalemile
Programmer
Hi all,
I have three boolean variables:
boolean flag1;
boolean flag2;
boolean flag3;
I want to represent them as octal number and convert this octal number into integer represented as String, i.e. if flags are:
flag1 is true
flag2 is false
flag3 is true
then String should be "5" which is binary 5 (0b101).
Maybe shift operator would be better solution, not sure, but I need shortest possible solution
many thanks,
mile
I have three boolean variables:
boolean flag1;
boolean flag2;
boolean flag3;
I want to represent them as octal number and convert this octal number into integer represented as String, i.e. if flags are:
flag1 is true
flag2 is false
flag3 is true
then String should be "5" which is binary 5 (0b101).
Maybe shift operator would be better solution, not sure, but I need shortest possible solution
many thanks,
mile