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

 

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

Write a method that turns a normal string into a "Yoda talk" string by reversing the order of all of the words in the string. Words are separated by a single space character. As preconditions you may assume the input string will never have more than one space in a row and will not start or end with a space. It IS possible for the string to have NO SPACES or to be an empty string.


Oct11_2019_HL_yodaTalk("Ummm, the force is strong with you, umm") → "umm you, with strong is force the Ummm,"
Oct11_2019_HL_yodaTalk("I am talking backwards") → "backwards talking am I"
Oct11_2019_HL_yodaTalk("You are a super programmer") → "programmer super a are You"

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

public String Oct11_2019_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: 350

Copyright Nick Parlante 2017 - privacy