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

 

ithName


Given an array of names and an int i, return the ith name. There will always be at least one name in the array. The value of i will never be greater than the number of names in the array.


ithName(["Larry", "Moe", "Curly Joe"], 1) → "Larry"
ithName(["Able", "Baker", "Charlie", "David", "Elmer", "Frank", "Gary", "Harald", "Imogen", "Jules"], 4) → "David"
ithName(["Able", "Baker", "Charlie", "David", "Elmer", "Frank", "Gary", "Harald", "Imogen", "Jules"], 8) → "Harald"

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

public String ithName(String[] names, int i) { }

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

Copyright Nick Parlante 2017 - privacy