Michael Fraczek

Greenhorn
+ Follow
since Nov 30, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Michael Fraczek

Here is a sample of the code I have written so far:

[ November 30, 2002: Message edited by: Marilyn de Queiroz ]
21 years ago
I have a program in which a user buys an item at a store. I have the user input the itemName, quantity, unitPrice, and whether it is taxable or not in a String which is tokenized into four parts, delimited by the "|" character.
Example: itemName|quantity|unitPrice|N
The N or n in the fourth token tells whether the purchase is taxable.
How can I use Java to reject the input and display an error message to the user if the fourth token is not input as a "n" or a "N"?
Any help is greatly appreciated!
21 years ago