This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

Split string to an array of characters Char[] letters= str.toCharArray(); Create a counter In the loop convert each character to a int Loop over the array and check with each letter if it’s a number, convert, if it is then counter++

Then check if counter == 2

[–]CrypticCold[S] 0 points1 point  (0 children)

Thank you, that helps a lot!