Java tutorial
public class Main { public static void main(String[] argv) { String str = "Java2s.com"; String str2 = "java2s.com"; System.out.println(str.compareTo(str2)); } }