System.out是打印还是作为条件求值?

xiaoxiao2026-06-17  25

Test 写道 public class Test { public static void main(String[] args) { for(int i=0;i<5;System.out.println("the number"+(i++))){     System.out.println(i);   } } } 结果: 写道 0 the number0 1 the number1 2 the number2 3 the number3 4 the number4  

 System.out.println("")平时都用作打印,在控制台输出,没想到还能这么用,可以作为一个条件!

转载请注明原文地址: https://www.6miu.com/read-5050280.html

最新回复(0)