Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7e0e784

Browse files
Update StringContainsVowels.java
1 parent 22b17f4 commit 7e0e784

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

‎src/StringContainsVowels.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,23 @@
1+
public class StringContainsVowels {
12

3+
public static boolean
4+
stringContainsVowels(String input) {
5+
6+
return input.toLowerCase().matches(".*[aeiou].*");
7+
8+
}
9+
10+
public static void main(String[] args) {
11+
12+
String input = "fdfd";
13+
14+
System.out.print(input + " ");
15+
16+
if (stringContainsVowels(input) == true) {
17+
System.out.println("contains vowel");
18+
} else {
19+
System.out.println("does not contain vowel");
20+
}
21+
}
22+
23+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /