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
class RegexUtility { | |
public static String[] matches(String pattern, String[] words) { | |
String s = pattern; | |
for (int i = 0; i < words.length; i++) { | |
if (!(words[i].matches(pattern))) words[i] = null; | |
} | |
return words; | |
} | |
} |
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
int x = 135; //stores the value 135 in an int variable named x | |
float y = 13.5f; //stores the float value 13.5 in a float variable named x | |
float z = 1.39e22; //stores the float value 1.39*10^22 in a float variable named z | |
long double a = 1.2345L; //stores the long double value 1.2345 |
NewerOlder