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

 

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

Write a method that accepts a string as an input parameter. As a precondition, you may assume that this input parameter will have an even number of characters. Return the string with adjacent characters flipped in their positions following this pattern: input parameter string = "ABCDEFGHIJ" returned result = "BADCFEHGJI".


dec16_2019_APP1SLHL_letterFlip("") → ""
dec16_2019_APP1SLHL_letterFlip("2X") → "X2"
dec16_2019_APP1SLHL_letterFlip("12345678") → "21436587"

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

public String dec16_2019_APP1SLHL_letterFlip(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: 290

Copyright Nick Parlante 2017 - privacy