Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {
    public static void main(String[] args) {
        String str1 = "Hello";
        String str2 = "HELLO";

        if (str1.equalsIgnoreCase(str2)) {
            System.out.println("Ignoring case str1 and str2 are equal");
        } else {
            System.out.println("Ignoring case str1 and str2 are not equal");

        }
        if (str1.equals(str2)) {
            System.out.println("str1 and str2 are equal");
        } else {
            System.out.println("str1 and str2 are not equal");
        }
    }
}