i am working on a calendar program how do i produce an error if the year is less than or equal to 1582 is this right it looks right to me if they entered high i want the program to continue any help me with this give me links to tutorials that can help too

System.out.println("Enter the year" );
year = Scan.nextInt();
if (year <= 1582)
System.out.println("Error that is year the calender was invented");
else
{
System.out.println("You Entered the following year" +year);


}

define: produce an error.
this way, you'll show a line in your Dos prompt. is this what you want to do?
if so, you have to place all the code that you want only to be run if the year's right in the else block of your if-statement