Question: Exercise 4: (3 points) Using substring() to reorder a String. You are going to write a method to takes a 26 character string such as

 Exercise 4: (3 points) Using substring() to reorder a String. You
are going to write a method to takes a 26 character string

Exercise 4: (3 points) Using substring() to reorder a String. You are going to write a method to takes a 26 character string such as "abcdefghijklmnopqrstuvwxy" and breaks it into three substrings: the first 8 characters, the next 7 characters, and the final 11 characters, and then reassembles these substrings in reverse order. Look at this diagram: If this was a deck of cards, it would be like a 3 way cut of the deck. You take off the top 8 cards and start a new stack. Then you take the next 7 cards and add them on top of the first part, and finally you add the remainder of the deck on top of that. Use this code as a starting point for this exercise. Just cut and paste it into your Lab4 project in the Package Explorer panel. public class ThreeCut public static void main (String[] args) \& string orig = "abcdefghijklmnopqrstuvwxyz" ; String s= orig; for (int i=1;i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!