Write code to convert Y to Boolean
//package com.book2s; public class Main { public static void main(String[] argv) { String str = "book2s.com"; System.out.println(toBoolean(str)); }/*from w w w . j a v a 2 s . c o m*/ public static boolean toBoolean(String str) { return str.equalsIgnoreCase("Y"); } }