Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * The InputReader class represents an input reader generator object.
- * It is used to read an input string.
- *
- * @author Andika Nugrahanto
- * @version 9-11-2020
- */
- import java.util.Scanner;
- public class InputReader
- {
- private Scanner read;
- /**
- * Constructor for objects of class InputReader
- */
- public InputReader()
- {
- read = new Scanner(System.in);
- }
- /**
- * Read the input string from user
- *
- * @return A string that explain the user problem
- */
- public String getInput()
- {
- System.out.print("> ");
- String inputLine = read.nextLine();
- return inputLine;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment