X109: lastTwo

Given a string of any length, return a new string where the last 2 chars, if present, are swapped, so "coding" yields "codign".

Reset

Practice a different Java exercise