问题求助,望大家帮帮忙!
1.编写程序输出下列结果:1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4 5 6
2.long r=40L int a=2
r/a的结果是20L,double型(书上这么写的,Java语言程序设计,郎波著,P51),为什么?

目前新手没积分,不好意思,谢谢各位了!

public class test { public static void main(String args[]){ byte []a = new byte[6]; for ( int i = 0 ,j; i < 6; i++){ a[i] = (byte) (i + 1); for ( j = 0; j < i; j++){ System.out.print(a[j]+" "); } System.out.println(a[j]); } } }