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

 

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

Write a method that returns 'str' but with all the capital letters removed. You are restricted to the following string methods: .length, .equals, .substring, .charAt, .compareTo. You may not use any other string methods, but otherwise there are no restrictions. Please note: In displaying results, CodingBat only shows one space when there are one or more consecutive spaces. If your results look just like the expected results, but it still shows yours as wrong, you probably have a problem with spaces.


test2022_11_17_SLHL_removeCaps("wRITING tEST dATA iS mY lEAST fAVORITE pART oF pROGRAMMING, bUT iT iS sTILL aN iMPORTANT pART.") → "w t d i m l f p o p, b i i s a i p."
test2022_11_17_SLHL_removeCaps("This is a TEST") → "his is a "
test2022_11_17_SLHL_removeCaps("All CAPS are to be removed, LeAvInG all OTHER sYmBoLs!") → "ll are to be removed, evn all smos!"

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

public String test2022_11_17_SLHL_removeCaps(String str) { }

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

Copyright Nick Parlante 2017 - privacy