编译为何出错?
import java.io.*;
public class simple{
public static void main(String args[]){
char c;
System.out.print("Enter a character please:");
try{
c=(char)System.in.read();
}
catch(IOException e){
System.err.println(e.toString());
}
System.out.println("You have entered character"+c);
}
}
编译时提示:variable c might not have been initialized