zoukankan      html  css  js  c++  java
  • 学习第二天

    输出菱形题目

    //打印出如下图案(菱形)
    //   *
    //  ***
    // *****
    //*******
    // *****
    //  ***
    //   *
    import java.util.Scanner;
    
    public class Topic5{
    	
    		public static void main(String[] args){
    			int num = 10;
    			for (int i=0;i<=num ;i++ ){
    				for (int j=1;j<=num-i ; j++)
    					System.out.print("");
    				for (int k=1; k<=i*2+1;k++ )
    					System.out.print("*");
    				System.out.print("
    ");
    			}
    
    			for (int i=num;i>=1 ;i-- ){
    				for (int j=0; j<=num-i;j++ )
    					System.out.print("");
    				for (int k=i*2-1;k>=1;k--)
    					System.out.print("*");
    				System.out.print("
    ");
    			}
    			
    			
    		}
    }
    

    JAVA知识点

    • JAVA数组加强循环:
          // 打印所有数组元素
          for (double element: myList) {
             System.out.println(element);
          }
    
    • 数组不能直接打印,要一次性打印数组的方法可用Arrays.toString(数组)方法一次性输出
    • 数组排序用Arrays.sort(数组)方法
    • 用char字符可以用单验号,用String定义字符串只能用双引号
    • 查看对象数据类型为object.getClass()方法
    • 单行计算max = (a>b)? a:b

    HTML知识点

    表格

    • 表格标签只能设置长度不能设置宽度,宽度根据表格内容自动调整,border属性设置边框线宽度
    • 行标签为<tr> lolspan=""属性可以设置行标签包含多少列
    • 列标签为<td> colspan=""属性可以设置列标签包含多少行
    • align属性设置对其方式
    • 单选和多选表格用name属性绑定为同一个选项

    editplus经典配色方案:把安装目录中的editplus_u.ini文件类容替换为以下内容

    [Options]
    Placement=2C0000000200000003000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7D0000007D0000007E0400008B020000FF
    Window List=00000000000000000000000000000000FF
    Marker List=00000000000000000000000000000000FF
    Function List=00000000000000000000000000000000FF
    Open Remote=00000000000000000000000000000000FF
    Expand=00000000000000000000000000000000FF
    Project Pos=00000000000000000000000000000000FF
    Workspace Path=D:Program
    Cliptext Window=195
    Cliptext Window 2=574
    Output=90
    Output 2=170
    Folding=1
    Tab Index=1
    Cliptext=2
    Custom colors=6D6D7200FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0031282700FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF
    Matching Brace=1
    Indent guide=1
    Cliptext Edit=00000000000000000000000000000000FF
    Right Side Panel=145
    Right Side Panel 2=574
    [Files]
    Encoding=65001
    Backup=0
    Backup Remote=0
    [Fonts]
    Edit Window=F0FFFFFF00000000000000000000000090010000000000010302013143006F007500720069006500720020004E0065007700000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF
    Printer=F4FFFFFF00000000000000000000000090010000000000000000003143006F007500720069006500720020004E0065007700000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF
    Output Window=F4FFFFFF00000000000000000000000090010000000000000000003143006F007500720069006500720020004E0065007700000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF
    Cliptext Window=F4FFFFFF0000000000000000000000009001000000000001000000004D006900630072006F0073006F006600740020005900610048006500690020005500490000000000000000000000000000000000000000000000000000000000FF
    Document Selector=F4FFFFFF0000000000000000000000009001000000000001000000004D006900630072006F0073006F006600740020005900610048006500690020005500490000000000000000000000000000000000000000000000000000000000FF
    Hex Viewer=F4FFFFFF00000000000000000000000090010000000000010000003143006F007500720069006500720020004E0065007700000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF
    Custom 1=F4FFFFFF00000000000000000000000090010000000000000000002241007200690061006C000000720020004E0065007700000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF
    Custom 2=F5FFFFFF000000000000000000000000900100000000000000000022560065007200640061006E00610000004E0065007700000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF
    Custom 3=F4FFFFFF000000000000000000000000900100000000000000000012540069006D006500730020004E0065007700200052006F006D0061006E0000000000000000000000000000000000000000000000000000000000000000000000FF
    Custom 4=F5FFFFFF0000000000000000000000009001000000000000000000224D0053002000530061006E0073002000530065007200690066000000000000000000000000000000000000000000000000000000000000000000000000000000FF
    Custom 5=F3FFFFFF00000000000000000000000090010000000000FF000000315400650072006D0069006E0061006C00000065007700000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF
    [Tool Option]
    Top Selector=1
    [ColorsText]
    Background=2238503
    Default=0
    Foreground=16777215
    [ColorsKeyword 1]
    Foreground=8272368
    Default=0
    [ColorsEmbedded script]
    Foreground=16777215
    Default=0
    [ColorsKeyword 3]
    Foreground=16777215
    Default=0
    [ColorsKeyword 6]
    Foreground=8716287
    Default=0
    [ColorsKeyword 7]
    Foreground=8716287
    Default=0
    [ColorsKeyword 8]
    Foreground=8716287
    Default=0
    [ColorsKeyword 9]
    Foreground=8454143
    Default=0
    [ColorsKeyword 10]
    Foreground=8716287
    Default=0
    [ColorsQuotation]
    Foreground=8454143
    Default=0
    [ColorsQuotation 2]
    Foreground=5107956
    Default=0
    [ColorsLine comment]
    Foreground=10789024
    Default=0
    [ColorsLine number]
    Foreground=12632256
    Background=2238503
    Default=0
    [ColorsFolding mark -]
    Background=2238503
    Default=0
    [ColorsMatching words]
    Default=0
    Background=718314
    [ColorsKeyword 2]
    Foreground=16379142
    Default=0
    [ColorsFolding mark +]
    Background=2238503
    Default=0
    [ColorsText selection]
    Background=7039851
    Default=0
    [ColorsNumber]
    Foreground=16524240
    Default=0
    [ColorsBlock comment]
    Foreground=8421504
    Default=0
    [ColorsKeyword 5]
    Foreground=15574913
    Default=0
    [ColorsRuler]
    Foreground=12632256
    Default=0
    Background=2566187
    [ColorsCursor indicator]
    Background=16777215
    Default=0
    [ColorsIndent Guide]
    Foreground=7499117
    Default=0
    
  • 相关阅读:
    想算法无头绪,咋办?
    使用R语言分析股价波动
    cmd控制台 wrapper | OpenSCManager failed
    Ubuntu使用vi命令时,不能正常编辑文件,使用方向键时老是出现很多字母解决方案
    Ubuntu su命令 Authentication failure的解决办法
    Springboot2.x整合RabbitMQ
    RabbitMQ 笔记
    Ubuntu安装RabbitMQ
    使用xshell连接ubuntu
    Java 泛型
  • 原文地址:https://www.cnblogs.com/zhz-8919/p/10600899.html
Copyright © 2011-2022 走看看