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

 

jebbert@volusia.k12.fl.us > test2021_11_04_APSLHL_longer
prev  |  next  |  chance

Return the length of the LONGER of the two input parameter strings. If the two strings have the same length, return zero to indicate that. Look at the test data for examples.


test2021_11_04_APSLHL_longer("Strings are fun!", "short") → 16
test2021_11_04_APSLHL_longer("Go forth and be excellent", "You can make a difference, especially if you subtract two numbers!") → 66
test2021_11_04_APSLHL_longer("Quest for knowledge", "be excellent") → 19

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

public int test2021_11_04_APSLHL_longer(String str1, String str2) { }

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

Copyright Nick Parlante 2017 - privacy