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

 

abraskin@mbusd.org 2016_student_creations_01 > secondInstance
prev  |  next  |  chance

Given a string and character, return an integer based on the position of the second instance of that character. ("Hello","l") -> 3. If the character is not in the string, then return 0 instead;


secondInstance("moodle", "o") → 2
secondInstance("hello", "l") → 3
secondInstance("Kevin", "i") → 0

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

public int secondInstance(String a, String b) { }

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: 120

Copyright Nick Parlante 2017 - privacy