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

 

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

When given 2 strings put the shorter string first. if one of the the strings is blank only return the non blank string. If they are the same length return String a first.


smallFirst("", "") → ""
smallFirst("hello", "world") → "hello"
smallFirst("Why", "world") → "Whyworld"

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

public String smallFirst(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: 100

Copyright Nick Parlante 2017 - privacy