On What Day Is That Date I got bored on my long weekend so I decided to have my coding exercise. And I successfully made a program that let you input the day and the month then it gives you the day of given date. But sadly it's only for 2014 calendar.

import java.io.*;

public class DaysToYears{
public static void main(String[] args) throws ArrayIndexOutOfBoundsException{
  BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));
  try{
    String []yearName = {"January","February","March","April","May","June","July","August","September","October","November","December"};
    String []days = {"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
    int []yearsCode = {6, 2, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4};
    int firstCase = 0;
    int secondCase = 0;
    String inputMonth = new String();
    int inputDate = 0;
      System.out.print("Enter your month: ");
        inputMonth = dataIn.readLine();
      System.out.print("Enter your date:  ");
        inputDate = Integer.parseInt(dataIn.readLine());
          for(int nodeCount=0;nodeCount&lt;yearName.length;nodeCount++){
              if(inputMonth.equalsIgnoreCase(yearName[nodeCount])){
                if(inputDate &lt; 7){
                    firstCase = (yearsCode[nodeCount] + inputDate + 3) % 7;
                    System.out.println(yearName[nodeCount] + " " + inputDate + " is " + days[firstCase]);
                    }else{
                      secondCase = (yearsCode[nodeCount] + inputDate + 3) % 7;
                      System.out.println(yearName[nodeCount] + " " + inputDate + " is " + days[secondCase]);
                      }
                    }
                  }
    }catch(IOException e){
      System.out.println("Error getting input!");
    }
  }
}
This "new String()" is unnecessary:

String inputMonth = new String();


I would leave it out completely:

String inputMonth;