Package src.utils

Class Utils

java.lang.Object
src.utils.Utils

public class Utils extends Object
A Utils Class for utility functions
  • Field Details

    • scanner

      private static Scanner scanner
  • Constructor Details

    • Utils

      private Utils()
  • Method Details

    • inputString

      public static String inputString(String text)
      Reads a String from stdin
      Parameters:
      text - The text displayed before reading input
      Returns:
      The String from stdin
    • inputInt

      public static int inputInt(String text)
      Reads an int from stdin
      Parameters:
      text - The text displayed before reading input
      Returns:
      The int from stdin
    • inputDate

      public static LocalDate inputDate(String text)
      Reads a date from stdin
      Parameters:
      text - The text displayed before reading input
      Returns:
      The date from stdin
    • clear

      public static void clear()
      Clears the screen