Check the given two strings are equals or not - Java Quiz Question

Write a program to check the given two strings are equals or not, with the help of equals method.

Input (String, String) Output (Boolean)
'java', new String('java') true
'Java School', new String('JavaSchool') false
'MeritCampus', new String('MeritCampus') true
'Vijayawada', new String('VIJAYAWADA') false

class ComparingStringsWithEqualsMethod
    public static void main(String s[])
        String firstString = "java";
        String secondString = new String(firstString);
        System.out.println("Both Strings are equals : " + areEquals(firstString, secondString));


    public static boolean areEquals(String firstString, String secondString) {