class t{
Somebody please help me with one very simple program in java. I'm new to java, so I can't understand what all this errors about. Please help me fix this program.
It gives three errors:
illegal start of type
swith (s)
orphaned case
case 'Y':
<identifier> expected
switch (s);
__________________________
class t {
char s = 'Y';
switch (s);
{
case 'Y':
System.out.println("Yes");
break;
case 'N':
System.out.println("No");
break;
default:
System.out.println("Default");
break;
}
}