Java tutorial
//package com.java2s; public class Main { public static int strBooleanToInt(String s) { if (s.equals("true")) return 1; return 0; } }