123456789101112131415161718192021222324252627282930313233343536373839404142 |
-
- import java.util.Scanner;
- /**
- * Created by leon on 2/9/18.
- */
- public class Console {
-
- public static void print(String output, Object... args) {
- System.out.printf(output, args);
-
- }
-
- public static void println(String output, Object... args) {
- print(output + "\n", args);
- }
-
- public static String getStringInput(String prompt) {
- Scanner scanner = new Scanner(System.in);
- println(prompt);
- String userInput = scanner.nextLine();
- return userInput;
- }
-
- public static Double getDoubleInput(String prompt) {
- Scanner scanner = new Scanner(System.in);
- println(prompt);
- String userInput = scanner.nextLine();
- return userInput.parseDouble();
- }
-
- public static Integer getIntegerInput(String prompt) {
- return null;
- }
-
- public static Double getDoubleInput(String prompt) {
- Scanner sc = new Scanner(System.in);
- Double userNumber1 = sc.nextDouble();
- return userNumber1;
-
- }
- }
|