Groups
Groups
Sign in
Groups
Groups
Java User Group For City Of Mysore In Karnataka, India
Conversations
About
Send feedback
Help
I just started Java and one of my programs isnt working right. Help Please!
1 view
Skip to first unread message
Jacob
unread,
Jun 2, 2008, 7:41:34 AM
6/2/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Java User Group For City Of Mysore In Karnataka, India
Here is a copy of the program
class Help {
public static void main(String args[])
{
throws java.io.IOException
{ //Gives an error here
on compiling
char choice;
System.out.println("Help on:");
System.out.println(" 1. if");
System.out.println(" 2. switch");
System.out.println("Enter your choice:");
choice=(char) System.in.read();
switch (choice)
{
case '1' :
System.out.println("The If:");
System.out.println("if(condition)statment");
System.out.println("else statment");
break;
case '2' :
System.out.println("The Switch");
System.out.println("switch(expression) {");
System.out.println(" case constant:");
System.out.println(" statment sequence");
System.out.println(" break");
System.out.println("..........//");
System.out.println("}");
break;
default:
System.out.println("Invalid Choice");
}
}
}
}
Reply all
Reply to author
Forward
0 new messages