java小记3~Java.进入IT企业必读的324个JAVA面试题

public class Test {
	static int ary[] = new int[10];
	static int a;
	static short s1=1;
	
	public static void main(String[] args){
		System.out.println(ary[1]);//0
		System.out.println(a);//0
		s1+=1;
		//s1=s1+1;//int 不能转换成short
		System.out.println(s1);//2
	}
}
发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>