Try to read a line. If there is no line, throw an IllegalStateException(). If there is a line, output Elvis says: $line.
Use the ?: throw construction to solve this task.
Try to read a line. If there is no line, throw an IllegalStateException(). If there is a line, output Elvis says: $line.
Use the ?: throw construction to solve this task.
Sample Input 1:
hairstyleSample Output 1:
Elvis says: hairstyleCreate a free account to access the full topic