葉可棠w3schools,Jaba雙迴圈,int整數,String字串,+串接+運算子operand

Java程式碼

/*葉可棠2022/10/17w3Schools學雙迴圈,運算子operator,運算元operand*/
public class Main {
  public static void main(String[] args) {
    int i, j;                    /*宣告整數integer變數i, j*/
    String a="第", b="列:";       /*宣告整數字串a, b給初始值*/
    for ( i = 10; i > 0; i--) {   /*迴圈*/
       System.out.print(a + i + b);/*+運算子用在字串,串接功能*/
       for ( j = 0; j <= i; j++)/*迴圈內僅有一道指令,可以不加{...}*/
          System.out.print(j);  /*print輸出完,下一個print在後面,*/
       System.out.println();    /*println輸出完換列line,()空的,只有換列*/
       for ( i =40845; i < 40960; i ++)
    {  a = Character.toString(i);
       System.out.println( i + " 字碼的字元是 " + a );
    }
} } }

留言

這個網誌中的熱門文章

葉可棠python字典

葉可棠期中考VS Code編輯Python