Question: So I need to make a java program that reverse or replace firstor lastchar or remove char from user's string input. length, concat, charAt, substring,

So I need to make a java program that reverse or replace firstor lastchar or remove char from user's string input.

length, concat, charAt, substring, and equals (orequalsIgnoreCase) thses are the string method that only I canuse

for example

if user put asdf asdf and chose reverse

input should be fdsa fdsa

if user put asdf asdf and chose replace first a with b

input should be bsdf asdf

if user put asdf asdf and chose remove a and 2

input should be asdf sdf (remove 2nd 'a')

aaaaddd remove all 'a' = ddd

Since I cannot use replace or remove method I have no idea howto start this coding...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To reverse a string you can use the length and charAt methods of the String class Heres an example o... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!