id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

crehwinkel@frhsd.com apcsa-pig-latin > firstVowelIndex
prev  |  next  |  chance

Write a method called firstVowelIndex which takes a String as a parameter and which returns an integer representing the index of the first vowel found in the input String. For example firstVowelIndex("break") would return 2 since the first vowel was found at index 2. (Don't consider the letter y to be a vowel)


firstVowelIndex("abc") → 0
firstVowelIndex("zzzyy") → -1
firstVowelIndex("thread") → 3

...Save, Compile, Run (ctrl-enter)

public int firstVowelIndex(String str){ }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 200 Post-solution available

Copyright Nick Parlante 2017 - privacy