Java Cast Bolean a int

int result = myBooleanVar ? 1 : 0;
Better Beetle