r/javahelp • • May 01 '20

Java Problem

Create a method called process that takes in as input a String and returns a String. The method will break the String on the letter ‘e’ and move all letters after the ‘e’ to be the beginning of a new string and any letters before the ‘e’ to be the end of the String. Any String given to the method is guaranteed to have exactly one occurrence of the letter ‘e’. For example: The method would take the String “Bobehi” would return “hiBob”.

Can someone help me with this please. a simple why of doing this would be great. Thanks

2 Upvotes

7 comments sorted by

View all comments

4

u/Camel-Kid 18 year old gamer May 01 '20

Show your code, what you have tried and what isn't working, why you think it isn't working etc.

1

u/l_Syn_l May 01 '20

That's the thing i dont know how to start it. Looking for someone to show me so i can understand it better.

3

u/Camel-Kid 18 year old gamer May 01 '20

start with creating a method with a string return type and string parameter. You're going to have to loop through the string looking for letter e. start from there

1

u/l_Syn_l May 01 '20

Great ill give it a try