How to write this method - positive numbers rotate to the


How to write this method?

String getRotatedFullName(int shift). This method returns your name, rotated (with wrap-around), by 'shift' characters. Positive numbers rotate to the left, and negative numbers rotate to the right.

For example, for my name "Jim Jones", if I executed:
For example, for my name "Jim Jones", the following client code would behave as such:
System.out.println(j.getRotatedFullName(2));
System.out.println(j.getRotatedFullName(-5));
And I would expect to get the output:
m JonesJi
JonesJim

Solution Preview :

Prepared by a verified Expert
JAVA Programming: How to write this method - positive numbers rotate to the
Reference No:- TGS02398209

Now Priced at $10 (50% Discount)

Recommended (97%)

Rated (4.9/5)