Language: Java

import java.util.Scanner;

public static Main {
    public static void main(String[] args) {
        String[][] month_and_day = {
            ['1', '31'],
            ['2', '28'],
            ['3', '31'],
            ['4', '30'],
            ['5', '31'],
            ['6', '30'],
            ['7', '31'],
            ['8', '31'],
            ['9', '30'],
            ['10', '31'],
            ['11', '30'],
            ['12', '31']
        };

        String[] m1d1;
        String[] m2d2;
        int ret = 0;

        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        m1d1 = str.split(' ');

        str = scan.nextLine();
        m2d2 = str.split(' ');

        for (int i = 0; i < month_and_day.length; i++) {
            if (m1d1[0].equals(month_and_day[i][0]) && m1d1[1].equals(month_and_day[i][1])) {
                if (m2d2[0].equals(month_and_day[i + 1][0]) && m2d2[1].equals(month_and_day[i + 1][1])) {
                    ret = 1;
                    break;
                }
            }
        }

        return ret;

    }
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
public static Main {
              ^
Main.java:6: error: unclosed character literal
            ['1', '31'],
                  ^
Main.java:6: error: unclosed character literal
            ['1', '31'],
                     ^
Main.java:7: error: unclosed character literal
            ['2', '28'],
                  ^
Main.java:7: error: unclosed character literal
            ['2', '28'],
                     ^
Main.java:8: error: unclosed character literal
            ['3', '31'],
                  ^
Main.java:8: error: unclosed character literal
            ['3', '31'],
                     ^
Main.java:9: error: unclosed character literal
            ['4', '30'],
                  ^
Main.java:9: error: unclosed character literal
            ['4', '30'],
                     ^
Main.java:10: error: unclosed character literal
            ['5', '31'],
                  ^
Main.java:10: error: unclosed character literal
            ['5', '31'],
                     ^
Main.java:11: error: unclosed character literal
            ['6', '30'],
                  ^
Main.java:11: error: unclosed character literal
            ['6', '30'],
                     ^
Main.java:12: error: unclosed character literal
            ['7', '31'],
                  ^
Main.java:12: error: unclosed character literal
            ['7', '31'],
                     ^
Main.java:13: error: unclosed character literal
            ['8', '31'],
                  ^
Main.java:13: error: unclosed character literal
            ['8', '31'],
                     ^
Main.java:14: error: unclosed character literal
            ['9', '30'],
                  ^
Main.java:14: error: unclosed character literal
            ['9', '30'],
                     ^
Main.java:15: error: unclosed character literal
            ['10', '31'],
             ^
Main.java:15: error: unclosed character literal
            ['10', '31'],
                ^
Main.java:15: error: unclosed character literal
            ['10', '31'],
                   ^
Main.java:15: error: unclosed character literal
            ['10', '31'],
                      ^
Main.java:16: error: unclosed character literal
            ['11', '30'],
             ^
Main.java:16: error: unclosed character literal
            ['11', '30'],
                ^
Main.java:16: error: unclosed character literal
            ['11', '30'],
                   ^
Main.java:16: error: unclosed character literal
            ['11', '30'],
                      ^
Main.java:17: error: unclosed character literal
            ['12', '31']
             ^
Main.java:17: error: unclosed character literal
            ['12', '31']
                ^
Main.java:17: error: unclosed character literal
            ['12', '31']
                   ^
Main.java:17: error: unclosed character literal
            ['12', '31']
                      ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
    public static void main(String[] args) {
                  ^
  (use --enable-preview to enable unnamed classes)
Main.java:26: error: class, interface, enum, or record expected
        m1d1 = str.split(' ');
        ^
Main.java:28: error: class, interface, enum, or record expected
        str = scan.nextLine();
        ^
Main.java:29: error: class, interface, enum, or record expected
        m2d2 = str.split(' ');
        ^
Main.java:31: error: class, interface, enum, or record expected
        for (int i = 0; i < month_and_day.length; i++) {
        ^
Main.java:31: error: class, interface, enum, or record expected
        for (int i = 0; i < month_and_day.length; i++) {
                        ^
Main.java:31: error: class, interface, enum, or record expected
        for (int i = 0; i < month_and_day.length; i++) {
                                                  ^
Main.java:35: error: class, interface, enum, or record expected
                    break;
                    ^
Main.java:36: error: class, interface, enum, or record expected
                }
                ^
Main.java:42: error: class, interface, enum, or record expected
    }
    ^
41 errors