bolean to integer 0 1 code example Example: java cast bolean to int int result = myBooleanVar ? 1 : 0;