zoukankan      html  css  js  c++  java
  • Homework2

    第一个程序的错误是i>0,i的取值应该是从0开始的,所以这里应该是i>=0。
    test: x=null        does not execute the fault.
    test: x=[2,3,2];y=2    executes the fault, but does not result in an error state.
    test: x=[4,3,1];y=2    results in an error, but not a failure.

    第二个程序的错误是for循环语句for (int i = 0; i < x.length; i++)这个语句找的是第一个0,应该是for (int i=x.length-1; i >= 0; i--)这个才是找最后一个0

    test:x=null        does not execute the fault.
    test:x=[0]        executes the fault, but does not result in an error state.
    test:x=[1,2,0]        results in an error, but not a failure.

  • 相关阅读:
    swift 上的 lazy
    oc runtime
    iOS布局
    ios微信支付 v3
    好用的工具
    自己曾经没注意的东西
    根据文字计算出label的高度
    项目swift的一些问题
    UIAppearance
    书签
  • 原文地址:https://www.cnblogs.com/wsruning/p/5242563.html
Copyright © 2011-2022 走看看