-
Notifications
You must be signed in to change notification settings - Fork 135
Expand file tree
/
Copy pathApp.java
More file actions
24 lines (22 loc) · 830 Bytes
/
App.java
File metadata and controls
24 lines (22 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import models.PingPong;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class App {
public static void main(String[] args) {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
System.out.println("I'm a ping-pong application!");
System.out.println("Enter a number:");
try {
String stringUserNumber = bufferedReader.readLine();
int intUserNumber = Integer.parseInt(stringUserNumber);
PingPong pingPong = new PingPong();
ArrayList<Object> pingPongResult = pingPong.runPingPong(intUserNumber);
System.out.println(pingPongResult);
}
catch (IOException e){
e.printStackTrace();
}
}
}