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

 

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

Write a method that determines if the string 'orig' ends with the string 'target'. If 'orig' ends with 'target' return true, otherwise return false. The only string methods you are allowed to use are: .length, .substring, .charAt, and .equals. You do not have to use all of these methods, but you can if you need to. Look at the test data for examples.


test2022_11_03_APP1SLHL_foundInBack("", "") → true
test2022_11_03_APP1SLHL_foundInBack("", "nothing") → false
test2022_11_03_APP1SLHL_foundInBack("nothing", "") → true

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

public boolean test2022_11_03_APP1SLHL_foundInBack(String orig, String target) { }

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