zoukankan      html  css  js  c++  java
  • 【Thinking in Java, 4e】控制流程执行

    p46~p75:

    【迭代】

    1、Java不允许将数字作为布尔值用。

    1、有点意思的小程序WhileTest。

    public class WhileTest {
        static boolean condition() {
            boolean result = Math.random() < 0.99;
            System.out.println(result + ", ");
            return result;
        }
        public static void main(String[] args) {
            while (condition()) {
                System.out.println("Inside 'while'");
            }
            System.out.println("Exited 'while'");
        }
    }

    【Foreach语法】

    1、对细节关注过多就很容易丢掉主干、本质。

    2、可读性就是:说明你在努力做什么,而不是给出你正在如何做的细节。

  • 相关阅读:
    搜索框的创建
    自定义非等高 Cell
    自定义等高 Cell
    表格多选删除
    聊天布局
    表格编辑
    表格折叠
    tableView 的协议方法
    UITouch
    UIDevice
  • 原文地址:https://www.cnblogs.com/xkxf/p/6582269.html
Copyright © 2011-2022 走看看