X26: atFirst

Write a function in Java that implements the following logic: Given a string, return a string made of its first 2 chars. If the string length is less than 2, use '@' for the missing chars.

Reset

Practice a different Java exercise