-4
package com.Bruno;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
System.out.print("How Many:");
int numberOne = Integer.parseInt(reader.nextLine());
while ((numberOne >=0) && (numberOne <=7)) {
System.out.print(printText() + "\n");
numberOne--;
}
public static void printText() {
System.out.println("In the beginning there were the swamp, the hoe and Java." + "/n");
}
}
}
你好,歡迎堆棧溢出!請編輯您的問題,以包含您要問什麼問題的一些說明。 –
在System.out.print中調用System.out.println。學到了一些東西。 –
只需調用'printText();' – shmosel