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

 

orion.a.smith@gmail.com apcsa-comparestrings > apcsaStringCompareFirst
prev  |  next  |  chance

Given an ArrayList of String values, find and return the String value which is "less than" all the others, as determined by using the compareTo method of the String class. Precondition: lst contains at least one String.


apcsaStringCompareFirst(["b", "a", "c"]) → "a"
apcsaStringCompareFirst(["a", "b", "c"]) → "a"
apcsaStringCompareFirst(["dab", "a"]) → "a"

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

public String apcsaStringCompareFirst(ArrayList<String> lst) { }

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

Copyright Nick Parlante 2017 - privacy