阅读背景:

我在执行一个简单的try catch块示例时遇到错误:“a无法解析为变量”

来源:互联网 
public class ex2 {
    public static void main(String[] args) 
    {
        try
        {
            String s= a[0];
            int x = Integer.parseInt(x);
            System.out.println("val of x = " +x);
        }
        catch(NumberFormatException nfe)
        {
            System.err.println("Enter numeric value");
        }
    }
}
public class ex2 {
    public static void main(



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: