Question: im using jdk se and i keep getting a parsing issue

"error: reached end of file while parsing"

i dont really understand why i keep getting this issue
i have my class closed and brackets in places i think i would need brackets.

```
import java.util.Scanner;

public class days_in_a_month {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);

System.out.print("Please enter a month:");
String month = input.nextLine();
input.nextLine();

System.out.print("Please enter a year:");
String year = input.nextLine();
input.nextLine();

  boolean isLeapYear = (year % 4 == 0 && year % 100 != 0)||(year % 400 == 0); 

    switch (month){
    case "1":
    case "3":
    case "5":
    case "7":
    case "8":
    case "10":
    case "12":
        System.out.println(month + " " + year + " has 31 days"); break;

    case "4":
    case "6":
    case "9":
    case "11":
        System.out.println(month + " " + year + " has 30 days"); break;

    case "2":
        if(isLeapYear)
        {
            System.out.println(month + " " + year + " has 29 days"); break;
        }
            else
        {
            System.out.println(month + " " + year + " has 28 days");
            }
        }
  }

```

Answer: 
the best way to solve is using some like this:

```
int year = input.nextInt();

```
just define **year** variable as **int**:

```
int year = Integer.valueOf(input.nextLine());

```

The problem is that you cannot use % operator for Strings

Here is the full example:

```
package com.yourpackage;

import java.util.Scanner;

public class days_in_a_month {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        System.out.print("Please enter a month:");
        String month = input.nextLine();
        input.nextLine();

        System.out.print("Please enter a year:");
        int year = Integer.valueOf(input.nextLine());
        input.nextLine();

        boolean isLeapYear = (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);

        switch (month) {
            case "1":
            case "3":
            case "5":
            case "7":
            case "8":
            case "10":
            case "12":
                System.out.println(month + " " + year + " has 31 days");
                break;

            case "4":
            case "6":
            case "9":
            case "11":
                System.out.println(month + " " + year + " has 30 days");
                break;

            case "2":
                if (isLeapYear) {
                    System.out.println(month + " " + year + " has 29 days");
                    break;
                } else {
                    System.out.println(month + " " + year + " has 28 days");
                }
        }
    }
}

```

Don't forget to name your file for as "**days\_in\_a\_month**" and to define the appopriate **package** in the top of the file!