I want to do something like this:
public enum Permissions
{
CanBlah1,
CanBlah2,
CanBlah3
}
byte[] userPerm = Permissions.CanBlah1 | Permissions.CanBlah2;
// check permssions
//
if(userPerm && Permissions.CanBlah1 == Permissions.CanBlah1)
{
// do something
}
Can you do this in Java like that? (I'm coming from a c# background)