1
I have an array of strings
String[] jt = { "João Mendonça", "Mário Andrade", "João Mendonça"});
What’s supposed to be check out if the array contains at least one letter character and that has no repeated name, that is, in this specific case it contains in min a letter and has a repeated name. the expected output will be:
java.lang.IllegalArgumentException: nome repetido
my problem is how to check if it has at least one letter character and how to check if it has repeated name.
Explaining better:
I have JT String Array to which I want to do 2 checks:
1-check that at least 1 character is a letter.
2 - Check for equal names: jt= {"nome","nome","nome")
, if there exists returns
java.lang.IllegalArgumentException: nome repetido
Voce could implement the code of eliminate repeated values switching from int to string right?
– Math
is talking about the repetition, is what I imagined but does not work even changing ints to strings
– board11
because it doesn’t work? what went wrong?
– Math
@board11 Have a repeated name where?
– Jorge B.
my mistake, I’ve already edited
– board11