Method writing with strings
in
Programming Questions
•
1 year ago
Hey everyone,
I've been trying to write a method which checks the users input (a word) with a list of letters I have stored in a string. If the word entered contains the letters in the string I want it to return true, otherwise false. Below is my futile attempt at it :S
boolean IsMirrorImage(String input){
String mirror = "AHIMOTUVWXYimnouvwx";
for (int i=0; i<input.length(); i++){
input.charAt(i);
if(input.(has any value within String mirror))
return true;
else
return false;
}
}
I'm wondering if the String mirror is written correctly and what im trying to do with it is actually possible. All help would be appreciated,
Thanks :)
1