文字列scadena1 = new String（ "avila"）;
文字列scadena2 = new String（ "avila"）;

if（scadena1.equalsignorecase（scadena2））
 System.out.println（scadena1 + "および" + scadena2 + "は同じ"）;
それ以外
 system.out.println（scadena1 + "および" + scadena2 + "は異なる"）;
String sCadena1 = new String("Avila");
String sCadena2 = new String("AVILA");

if (sCadena1.equalsIgnoreCase(sCadena2))
 System.out.println(sCadena1 + " y " + sCadena2 + " son IGUALES");
else
 System.out.println(sCadena1 + " y " + sCadena2 + " son DIFERENTES");