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

 

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

Write a method that returns the "Yoda" version of a string. It does this by reversing the order of all the words in the sentence. A 'word' is considered any non-space characters in a row separated by a space. Note that there will also be an extra space at the end of the new string, so in all cases the new string will end in a space.


oct18_2016_HL_yodaTalk("Yoda") → "Yoda "
oct18_2016_HL_yodaTalk("I am talking backwards") → "backwards talking am I "
oct18_2016_HL_yodaTalk("the Force is with you") → "you with is Force the "

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

public String oct18_2016_HL_yodaTalk(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: 220

Copyright Nick Parlante 2017 - privacy