Write a Scala program to create a new string taking the first 3 characters of a given string and return the string with the 3 characters added at both the front and back
Write a Scala program to create a new string taking the first 3 characters of a given string and return the string with the 3 characters added at both the front and back. If the given string length is less than 3, use whatever characters are there.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer