Posted by ¾çÁ¤À± on April 12, 1997 at 03:09:41:
Ã¥¿¡´Â ÀÖ´Â ¿¹Á¦¸¦ ÄÄÆÄÀÏ Çϴµ¥ Á»Ã³·³ µÇÁú ¾Ê±¸ ¿Ö±×·±Áö´Â
¸ð¸£°Ú±¸ ´ä´äÇؼ ÀÌ·¸°Ô ±ÛÀ» ¾¹´Ï´Ù/....Please, Help me!!
Source file:
class IfElseName {
public static void main (String args[]) {
char firstInitial;
System.out.println("Enter your first initial:");
firstInitial = (char) System.in.read();
if (firstInitial == -1)
System.out.println("Now what kind of name is that!?");
else if (firstInitial == 'j')
System.out.println("Your name must be Jules!");
else if (firstInitial == 'v')
System.out.println("Your name must be Vincent!");
else if (firstInitial == 'z')
System.out.println("Your name must be Zed!");
else
System.out.println("I can't figure out your name!");
}
}
Error Message :
Exception java.io.IoException must be caught, or
it must be declared in the throws clause of this method.