Language: Java

import java.util.Scanner;

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']
}

public static Main {
    public static void main(String[] args) {
        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: unnamed classes are a preview feature and are disabled by default.
String[][] month_and_day = {
^
  (use --enable-preview to enable unnamed classes)
Main.java:4: error: illegal start of expression
    ['1', '31'],
    ^
Main.java:4: error: unclosed character literal
    ['1', '31'],
          ^
Main.java:4: error: unclosed character literal
    ['1', '31'],
             ^
Main.java:5: error: unclosed character literal
    ['2', '28'],
          ^
Main.java:5: error: unclosed character literal
    ['2', '28'],
             ^
Main.java:6: error: unclosed character literal
    ['3', '31'],
          ^
Main.java:6: error: unclosed character literal
    ['3', '31'],
             ^
Main.java:7: error: unclosed character literal
    ['4', '30'],
          ^
Main.java:7: error: unclosed character literal
    ['4', '30'],
             ^
Main.java:8: error: unclosed character literal
    ['5', '31'],
          ^
Main.java:8: error: unclosed character literal
    ['5', '31'],
             ^
Main.java:9: error: unclosed character literal
    ['6', '30'],
          ^
Main.java:9: error: unclosed character literal
    ['6', '30'],
             ^
Main.java:10: error: unclosed character literal
    ['7', '31'],
          ^
Main.java:10: error: unclosed character literal
    ['7', '31'],
             ^
Main.java:11: error: unclosed character literal
    ['8', '31'],
          ^
Main.java:11: error: unclosed character literal
    ['8', '31'],
             ^
Main.java:12: error: unclosed character literal
    ['9', '30'],
          ^
Main.java:12: error: unclosed character literal
    ['9', '30'],
             ^
Main.java:13: error: unclosed character literal
    ['10', '31'],
     ^
Main.java:13: error: unclosed character literal
    ['10', '31'],
        ^
Main.java:13: error: unclosed character literal
    ['10', '31'],
           ^
Main.java:13: error: unclosed character literal
    ['10', '31'],
              ^
Main.java:14: error: unclosed character literal
    ['11', '30'],
     ^
Main.java:14: error: unclosed character literal
    ['11', '30'],
        ^
Main.java:14: error: unclosed character literal
    ['11', '30'],
           ^
Main.java:14: error: unclosed character literal
    ['11', '30'],
              ^
Main.java:15: error: unclosed character literal
    ['12', '31']
     ^
Main.java:15: error: unclosed character literal
    ['12', '31']
        ^
Main.java:15: error: unclosed character literal
    ['12', '31']
           ^
Main.java:15: error: unclosed character literal
    ['12', '31']
              ^
Main.java:18: error: class, interface, enum, or record expected
public static Main {
              ^
Main.java:43: error: class, interface, enum, or record expected
}
^
34 errors