123456789101112131415161718192021222324252627282930313233343536373839
  1. import java.util.Scanner;
  2. /**
  3. * Created by leon on 2/9/18.
  4. */
  5. public class Console {
  6. Double userInput;
  7. public Console(){
  8. userInput=5.0;
  9. }
  10. public static void print(String output, Object... args) {
  11. System.out.printf(output, args);
  12. }
  13. public static void println(String output, Object... args) {
  14. print(output + "\n", args);
  15. }
  16. public static String getStringInput() {
  17. Scanner scanner = new Scanner(System.in);
  18. String userInput = scanner.nextLine();
  19. return userInput;
  20. }
  21. public static Integer getIntegerInput() {
  22. return null;
  23. }
  24. public static Double getDoubleInput() {
  25. Scanner scanner = new Scanner(System.in);
  26. Double userInput = Double.parseDouble(scanner.nextLine());
  27. return userInput;
  28. }
  29. }