我要让每次打印的时候都执行一次hello and wellcomepublic class Main = public static void mainString args 当文本光标位于高亮显示的文本处时按 Opt+Enter 可查看 IntelliJ IDEA 对于如何修正该问题的建议。 SystemoutprintfHello and
public class Main { public static void main(String[] args) { System.out.printf("Hello and welcome!");
for (int i = 1; i <= 5; i++) {
System.out.println("i = " + i);
System.out.printf("Hello and welcome!"); // 添加该行代码
}
}
}
原文地址: http://www.cveoy.top/t/topic/feD6 著作权归作者所有。请勿转载和采集!