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

 

amjadm@miamioh.edu quiz10a-codingbat > reverse
prev  |  next  |  chance

Write a method called reverse which gets an int value in string type and reverses the digits and returns a new string value. So if the given string is "2341", reverse method returns "1432". Also overload the method to a method that gets an int type value and reverses the digits of the int value and returns a new int, e.g. reverse(123) -> 321 (so, you should write two methods)


reverse("") → ""
reverse(0) → 0
reverse("CSE174") → "471ESC"

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

public String reverse(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: 140

Copyright Nick Parlante 2017 - privacy