Suppose s is some string that has been created inside main


Suppose s is some string that has been created inside main, and suppose s.length() is greater than 3 (so s has more than 3 characters). Using the String class methods length and substring, write one or several lines of code that will print the last three characters in s. For example if s is the String "donkeys", then your code should print eys.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Suppose s is some string that has been created inside main
Reference No:- TGS02320053

Now Priced at $10 (50% Discount)

Recommended (91%)

Rated (4.3/5)