public class ish{
public static void main(String[] args)
{String s="call me ishmae";
System.out.println(s.charAt(s.length()-1));
}
}
则输出结果为:( )
A. a B. e C. c D. "
选出以下定义合法的标识符:( )
A String B _ac C int D
A. 接口里面的方法都是public abstract声明的。
B. 接口不能实例化。
C. 一类可以实现多个接口。
D. 以上都正确。
执行下面一段代码的输出结果是( )
int n=0;
try{
n=100/n;
n=Integer.parseInt("125$%3");
}
catch(ArithmeticException e){
System.out.println("除数为0");
}
catch(NumberFormatException e){
System.out.println("转换出错,含有非数字字符");
}
A. 除数为0
B. 转换出错,含有非数字字符
C. 除数为0转换出错,含有非数字字符
D. 没有任何输出信息