-->
当前位置:首页 > 题库

PROGRAMMING:Program error correction 4

Luz5年前 (2021-05-10)题库492
Program correction. Please modify the following code so that the program can output the correct results.

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Thread t = new Thread(new RunHandler());
t.run();
}
}
class RunHandler {
public void run() {
Scanner in = new Scanner(System.in);
int x = in.nextInt();
System.out.println("run");
}
}

###Input format:
Enter an integer X.
###Output format:
Output x lines, each line a string "run".
###Input example:
```in
four
```
###Output example:
```out
run
run
run
run
```







answer:If there is no answer, please comment