Java 輸出 print() 方法
示例
將一些文字列印到控制檯
System.out.print("Hello World! ");
System.out.print("I will print on the same line.");
定義和用法
print() 方法將文字或值列印到控制檯。
注意: print() 方法在輸出末尾不插入新行。但是,println() 方法會。
語法
System.out.print(argument);
引數值
引數 | 描述 |
---|---|
引數 | 應列印到控制檯的值或文字 |
技術詳情
返回 | 無返回值。 |
---|
❮ 輸出方法