Created
February 2, 2016 21:19
-
-
Save au5ton/511e8d1400e69ee489cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StringChecker { | |
private String word; | |
public StringChecker() { | |
setString(""); | |
} | |
public StringChecker(String s) { | |
setString(s); | |
} | |
public void setString(String s) { | |
word = s; | |
} | |
public boolean findLetter(char c) { | |
if(word.indexOf(c) != -1) { | |
return true; | |
} | |
else { | |
return false; | |
} | |
} | |
public boolean findSubString(String s) { | |
if(word.indexOf(s) != -1) { | |
return true; | |
} | |
else { | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment