ahh thank you,, got it,,
(!s.matches("[a-zA-Z]+") did the trick,,
hope i can get the next part done :D
Type: Posts; User: o2a1
ahh thank you,, got it,,
(!s.matches("[a-zA-Z]+") did the trick,,
hope i can get the next part done :D
my bad for crossposting,, but i didnt think i would get a reply, wont happen again,
ok so i put
if (s.matches("[a-zA-Z]"))
{
output.print("The string must consist of letters!");
}
but...
my program has to output and evaluate a string,
heres 3 examples of how it is supposed to run,
eg.1 (no string entered)
java Word
Usage: java Word <string>
eg.2(string containing...