输出菱形题目
//打印出如下图案(菱形)
// *
// ***
// *****
//*******
// *****
// ***
// *
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("\0");
for (int k=1; k<=i*2+1;k++ )
System.out.print("*");
System.out.print("\n");
}
for (int i=num;i>=1 ;i-- ){
for (int j=0; j<=num-i;j++ )
System.out.print("\0");
for (int k=i*2-1;k>=1;k--)
System.out.print("*");
System.out.print("\n");
}
}
}
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
[Colors\Text]
Background=2238503
Default=0
Foreground=16777215
[Colors\Keyword 1]
Foreground=8272368
Default=0
[Colors\Embedded script]
Foreground=16777215
Default=0
[Colors\Keyword 3]
Foreground=16777215
Default=0
[Colors\Keyword 6]
Foreground=8716287
Default=0
[Colors\Keyword 7]
Foreground=8716287
Default=0
[Colors\Keyword 8]
Foreground=8716287
Default=0
[Colors\Keyword 9]
Foreground=8454143
Default=0
[Colors\Keyword 10]
Foreground=8716287
Default=0
[Colors\Quotation]
Foreground=8454143
Default=0
[Colors\Quotation 2]
Foreground=5107956
Default=0
[Colors\Line comment]
Foreground=10789024
Default=0
[Colors\Line number]
Foreground=12632256
Background=2238503
Default=0
[Colors\Folding mark -]
Background=2238503
Default=0
[Colors\Matching words]
Default=0
Background=718314
[Colors\Keyword 2]
Foreground=16379142
Default=0
[Colors\Folding mark +]
Background=2238503
Default=0
[Colors\Text selection]
Background=7039851
Default=0
[Colors\Number]
Foreground=16524240
Default=0
[Colors\Block comment]
Foreground=8421504
Default=0
[Colors\Keyword 5]
Foreground=15574913
Default=0
[Colors\Ruler]
Foreground=12632256
Default=0
Background=2566187
[Colors\Cursor indicator]
Background=16777215
Default=0
[Colors\Indent Guide]
Foreground=7499117
Default=0