Category Archives: Java

How to store and retrieve multiple Boolean values using single integer value

There are situations when we need to store multiple Boolean values related to the properties of an object in our project. For example, I am going to create a project related to a client having multiple services to offer to the end user. To be more specific say we have a telecom operator having multiple services like SMS, Calling , Roaming, internet packs to be offered to their end user. Now for every customer record we need to store the information which services the user is having at any point of time. Here we are just covering the Boolean information like whether user is having SMS pack or not(instead of details of services) and similar information for other packs. Continue reading How to store and retrieve multiple Boolean values using single integer value