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

 

sspiege3@schools.nyc.gov > position7
prev  |  next  |  chance

Find the first position of the value 7 in an array. Return -1 if 7 does not exist.


position7([7, 1, 2, 3]) → 0
position7([1, 7, 2, 3]) → 1
position7([8, 9, 10, 11, 12]) → -1

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

public int position7( int [] vals){ }

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

Copyright Nick Parlante 2017 - privacy