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

 

simona1@sfusd.edu > findFirstA
prev  |  next  |  chance

Returns the index of the first letter "a" in the String parameter (also called an argument). Returns -1 if the String parameter does not contain the letter "a." Note that the String parameter is all lower case


findFirstA("eagle") → 1
findFirstA("criteria") → 7
findFirstA("try") → -1

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

public int findFirstA(String word){ }

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: 193 Post-solution available

Copyright Nick Parlante 2017 - privacy