• 20130329java基础学习笔记语句_for循环嵌套练习(99乘法表&转义字符)


    class ForFor99
    {
        public static void main(String[] args)
        {
            /* 九九乘法表:
            1*1=1
            1*2=2 2*2=4
            1*3=1 2*3=6 3*3=9
            ......
            */
            for(int x=1; x<=9; x++)
            {
                for(int y=1; y<=x; y++)
                {
                    System.out.print(y+"*"+x+"="+y*x+"\t");
                }
                System.out.println();//println中的ln是在最后位置换行;
            }
            System.out.println("\"hello\nword\"");
            /*转义字符:能转变某些字母和含义的符号称为转义字符;
            \n:回车;
            \t:制表符;(按下Tab键)
            \b:退格;
            \r:按下回车键;
            Windows系统中回车符其实是由两个符号组成的\r\n;
            Linux中回车符就是\n;
            */
        }
    }

  • 相关阅读:
    c++的正则库 pcre
    http://alibench.com
    常用正则表达式,来自新浪微博的js
    mysql的反向
    字母汉子组合的验证码,包括实现看不清换一个的功能
    什么是Ajax
    做“时间日志”
    计划比目标还要重要!
    成功座右铭一
    建立组织
  • 原文地址:https://www.cnblogs.com/lisu/p/2989227.html
Copyright © 2020-2023  润新知