软件测试homework2

1.1 for (int i=x.length-1; i > 0; i--)没有遍历整个数组, 应该为for (int i=x.length-1; i >= 0; i--) 。
1.2 test: x=[3, 2, 5]; y = 2 。
1.3 test: x=[3, 3, 5]; y = 2 。
1.4 test: x = [  2 ],y = 2。 

2.1 for 循环应改为for(i = x.length -1 ; i >= 0; i--)

2.2 test: x = [0, 2]

2.3 test: x = [2, 0, 0]

2.4 test: x = [0] 

原文地址:https://www.cnblogs.com/Theshy/p/5256239.html