Write a thread with the name stringProcessor by using the method thread(). The class must have a method that reads strings (line by line) from the standard input. If a read string has a lower case character, the processor must output the string in the upper case; otherwise, the processor must output "FINISHED" and stop the processing.
Custom threads
String processor
Report a typo
Sample Input 1:
Multithreading
Concurrency
Parallel
PROGRAMMINGSample Output 1:
MULTITHREADING
CONCURRENCY
PARALLEL
FINISHEDWrite a program in Kotlin
fun main() {
val stringProcessor = thread(block = {
// write your code here
})
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.