I am new to programming. Looked around the net and could not figure this problem out. Any help or explanation would be appreciated on why it keeps giving me an error.
Error: variable days might not have been initialized
import java.util.Scanner;
public class month{
public static void main (String[] args){
Scanner keyboard = new Scanner(System.in);
int month, days;
System.out.println("Enter the month: ");
month = keyboard.nextInt();
//month = ... // assume that we got this from the user
if((month == 1)|| (month == 3) || (month == 5) || (month == 7) ||
(month == 8) || (month == 10) || (month == 12))
days = 31;
else if ((month == 4)||(month == 6)||(month == 12))
days = 30;
else if (month == 2)
days = 28;
System.out.println("This month contains: " +days + " days");
}
}