-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestReadNumbers.java
More file actions
32 lines (26 loc) · 877 Bytes
/
TestReadNumbers.java
File metadata and controls
32 lines (26 loc) · 877 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
25
26
27
28
29
30
31
32
/*
Author: Pascal Bruno (pascal@pascalbruno.com)
Date: 03/09/13
Description: This program is used to test the ReadNumbers.java class
*/
import java.util.Scanner;
public class TestReadNumbers
{
public static void main(String[] args)
{
final String SENTINEL = "$";
String userInput;
Scanner keyboard = new Scanner(System.in);
String[] testArray;
while (true)
{
System.out.println("Enter string of integers you would like to read. Enter '$' to exit");
System.out.print("> ");
userInput = keyboard.nextLine();
if (userInput.equals(SENTINEL))
return;
ReadNumbers testObject = new ReadNumbers(userInput);
testObject.readNum();
}
}
}