software testing homework2
1、 In the first program, it can’t get the first parameter. In the second program, it will return when it finds the first zero, so it can’t find the last zero.
2、 FIRST: x=null y=1
Expected=NullPointerException
Actual value= NullPointerException
SECOND: x=null
Expected=NullPointerException
Actual value= NullPointerException
3、 FIRST: x=[1,2,3] y=2
Expected=1 Actual value=1
SECOND: x=[1,2,3]
Expected=-1 Actual value= -1
4、 FIRST: x=[1,2,3] y=0
Expected=-1 Actual value=-1
SECOND: x=[1,2,0]
Expected=2 Actual value= 2