I cant get this java program to work.Can anyone please tell me what the problem about this is and what should I do to correct it.
import java.io.*;
public class Wishes
{
public static void main(String args[])throws IOExceptation
{
int c;
InputStreamRead er read = new InputStreamRead er(system.in);
BufferedReader in = new BufferedReader( read);
System.out.prin tln("1 for Good Morning, 2 for Good afternoon, 3 for Good Evening, 4 for Good night");
System.out.prin tln("3");
c=Integer.parse Int(in ReadLine());
switch(c)
case 1:
System.out.prin tln("Good Morning");
break;
case 2:
System.out.prin tln("Good Afternoon");
break;
case 3:
System.out.prin tln("Good Evening");
break;
case 4:
System.out.prin tln("Good Night");
break;
Default
System.out.prin tln("It is a wrong choice");
}
}
import java.io.*;
public class Wishes
{
public static void main(String args[])throws IOExceptation
{
int c;
InputStreamRead er read = new InputStreamRead er(system.in);
BufferedReader in = new BufferedReader( read);
System.out.prin tln("1 for Good Morning, 2 for Good afternoon, 3 for Good Evening, 4 for Good night");
System.out.prin tln("3");
c=Integer.parse Int(in ReadLine());
switch(c)
case 1:
System.out.prin tln("Good Morning");
break;
case 2:
System.out.prin tln("Good Afternoon");
break;
case 3:
System.out.prin tln("Good Evening");
break;
case 4:
System.out.prin tln("Good Night");
break;
Default
System.out.prin tln("It is a wrong choice");
}
}
Comment