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

 

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

Write a method that returns the longer of the two input parameter strings. If they are the same length, return a string that says "They are the same length". Look at the test data for examples.


test2024_10_08_APP1SLHL_longer("longest", "short") → "longest"
test2024_10_08_APP1SLHL_longer("abcd", "abcdefghijkl") → "abcdefghijkl"
test2024_10_08_APP1SLHL_longer("adjusted", "fun") → "adjusted"

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

public String test2024_10_08_APP1SLHL_longer(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: 230

Copyright Nick Parlante 2017 - privacy