Question: Please advise the correct code Stretch With2Vowels - Java & Stretchwith 2vowel.. 1 import java.util. Scanner; 2 3 public class StretchWith2Vowels { 4 public static

Please advise the correct code

Please advise the correct code Stretch
Stretch With2Vowels - Java & Stretchwith 2vowel.. 1 import java.util. Scanner; 2 3 public class StretchWith2Vowels { 4 public static void main (String args) { n in Scanner in = now Scanner (System. in) ; String sentence; while (true) { System. out. print ("Sentence: "); sentence = in.nextLine(); 18 if (sentence. equals (".")) break; System. out. printin( "Matching words = " + countMatchingWords (sentence) ); System. out. printin("Done"); 15 16 17 public static int countMatchingWords (String sentence) { 18 int count = 8; 19 String words = sentence.split(" "); for (int i = 8; i 'o' | | ch => 'u") [ 48 ++ vowelCount; 41 42 43 return vowelCount == 2; AT 1 umStretchWith !vowed java Spacex 4 [Auto) Console Termina StretchWith2Vowels. java:21: error: cannot find symbol if (isMatchingWord(words [1] . to LowerCase ())) ++count; symbol: method tolowerCase() Location: class String error

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!