java android中未定义的标签

时间:2014-10-01 18:23:53

标签: java android

帮助我在&{39; break label60'上收到错误消息并且' break label54',它说undefined label"

感谢您的回复..

        int i=0;
        if (Jeep.getCenterX() <= x)
        {
            i = 1;
            if (150 + Jeep.getCenterX() < x) {
                break label54;
            }
        }
        label54:
        for (int j = 1;; j = 0)
        {
            if (((i & j) == 0) || (Jeep.getCenterY() > y) || (87 + Jeep.getCenterY() < y)) {
                break label60;
            }
            return true;
            i = 0;
            break;
        }
        label60:
        return false;

1 个答案:

答案 0 :(得分:0)

不提及标注breakcontinue是不好的做法,标签应放在switchforwhile或{{1}之前语句,而不是之后,所以它应该是:

do-while

See the documentation