Member
lou_lindgren
Convert Boolean into Int in Java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
public static int booleanToInt(Boolean value) { int res; if (value == null) { res = 0; } else { if (value) { res = 1; } else { res = 0; } } return res; }