Commons Lang、BooleanUtils.toStringYesNo()
import org.apache.commons.lang.BooleanUtils; public class C2009033100 { public static void main(String[] args) { System.out.println(BooleanUtils.toStringYesNo(true)); System.out.println(BooleanUtils.toStringYesNo(false)); System.out.println(BooleanUtils.toStringYesNo(new Boolean(true))); System.out.println(BooleanUtils.toStringYesNo(new Boolean(false))); } }
で、
yes no yes no