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

 

dsawyer@methacton.org string_arrays > len2
prev  |  next  |  chance

Given an array of Strings, return the number of elements that have a length of 2.


len2(["do", "re", "mi"]) → 3
len2(["two characters"]) → 0
len2(["12", "384", "00", "45.3", "1.9"]) → 2

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

public int len2( String [] a ){ }

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

Copyright Nick Parlante 2017 - privacy