diff --git a/README.md b/README.md new file mode 100644 index 0000000..83c66b0 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# HacktoberFest2021-2 +A beginner-friendly project to help you in open-source contributions. Made specifically for contributions in HACKTOBERFEST 2021. Please leave a star ⭐ to support...… diff --git a/find_word.java b/find_word.java new file mode 100644 index 0000000..f4e3f10 --- /dev/null +++ b/find_word.java @@ -0,0 +1,27 @@ +// WAP enter a sentence form keyboard and also find all the words in that +// sentence with starting character as vowel +import java.util.Scanner; +class Assginment2 +{ + public static void main(String[] arg) + { + String store="\n"; + char vowel=a; + Scanner sc=new Scanner(System.in); + System.out.print("Enter a string : "); + String take=sc.nextLine(); + String[] arr=take.split(" "); + for (String s : arr) + { + System.out.println(s); + int le=s.length(); + String[] arr2=new String[le]; + arr2= + if (arr2[0]==vowel) + { + store+=s; + } + } + System.out.println("These are the words which start with vowel : "+store); + } +}