I keep getting this error code:
----jGRASP exec: javac -g RomanNumerals.java
RomanNumerals.java:56: unreachable statement
defult:
1 error
----jGRASP wedge: exit code for process is 1. ----jGRASP: operation complete.
This is my code so far:
import java.util.Scanner;
public class RomanNumerals
{
public static void main(String[] args)
{
int input;
Scanner keyboard = new Scanner(System.in);
System.out.print("Enter a number: ");
input = keyboard.nextInt();
switch (input)
{
case 1:
System.out.println("I");
break;
case 2:
System.out.println("II");
break;
case 3:
System.out.println("III");
break;
case 4:
System.out.println("IV");
break;
case 5:
System.out.println("V");
break;
case 6:
System.out.println("VI");
break;
case 7:
System.out.println("VII");
break;
case 8:
System.out.println("VIII");
break;
case 9:
System.out.println("IX");
break;
case 10:
System.out.println("X");
break;
defult:
System.out.println("Please enter a number between 1 and 10. ");
}
}
}
you have typed 'defult:', but it should be ' default:'
try