Write code to check if two string are equal
//package com.book2s; public class Main { public static void main(String[] argv) { String str1 = "book2s.com"; String str2 = "book2s.com"; System.out.println(equalsIgnoreCase(str1, str2)); }/*from www .j av a 2s .c o m*/ public static boolean equalsIgnoreCase(String str1, String str2) { if (str1 == null) { return str2 == null; } return str1.equalsIgnoreCase(str2); } }