w3schools學習Java雙迴圈,宣告整數int,字串String

/* 游于葇2022/10/17,w3schools學習,for迴圈loop */ public class Main { /* 宣告類別class Main */ public static void main(String[] args) { int i; /* 宣告整數integer: i */ int j; /* 宣告整數j, 下次練習宣告字元char=character, 字串String */ for (i = 0; i < 20; i++) { /* for 迴圈Syntax語法 */ System.out.print("第" + i + "列:"); /*系統System,指令,方法,print列印,println列印完換列*/ for (j=0; j <= i; j++) { System.out.print(j + " "); /* 後面串連 空白字元*/ } System.out.println("."); } } }

留言

這個網誌中的熱門文章

串列list字典dict集合set對照至EXCEL樞紐分析

馬可維茲風險平均數平面

CSV程式庫