Language: Java

import java.util.Scanner;

public static class 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:6: error: illegal start of expression
            ['1', '31'],
            ^
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:26: error: <identifier> expected
        m1d1 = str.split(' ');
            ^
Main.java:28: error: <identifier> expected
        str = scan.nextLine();
           ^
Main.java:29: error: <identifier> expected
        m2d2 = str.split(' ');
            ^
Main.java:31: error: illegal start of type
        for (int i = 0; i < month_and_day.length; i++) {
        ^
Main.java:31: error: > or ',' expected
        for (int i = 0; i < month_and_day.length; i++) {
                                                ^
Main.java:31: error: <identifier> expected
        for (int i = 0; i < month_and_day.length; i++) {
                                                   ^
Main.java:40: error: illegal start of type
        return ret;
        ^
Main.java:40: error: <identifier> expected
        return ret;
                  ^
Main.java:43: error: class, interface, enum, or record expected
}
^
40 errors