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

 

tmhscs@gmail.com fundamentals > fund_compareNames
prev  |  next  |  chance

Given two Strings that are people's names, return whether or not the first name has more, less, or the same number of letters compared to the second name. The return should always be in the format of "firstname has more/less letters than secondname" where the names are the inputs a and b.


fund_compareNames("Joe", "Sally") → "Joe has less letters than Sally"
fund_compareNames("Sally", "Joe") → "Sally has more letters than Joe"
fund_compareNames("Joe", "Amy") → "Joe has the same number of letters as Amy"

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

public String fund_compareNames(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

Post-solution available

Copyright Nick Parlante 2017 - privacy