Below is the code that reads a string from the standard input and calculates the number of distinct characters in the string. For some reason, the developer Rebecca decided to perform calculations in a new thread. Sadly, her solution doesn't work correctly. Try to fix it.
Additional explanations: the implemented class SlowStringProcessor extends Thread and overrides the method run. It calculates the number of distinct characters passed to the constructor. The class has a getter getNumberOfUniqueCharacters() that returns the calculated number or 0 if the thread has not calculated the number yet. Keep in mind that SlowStringProcessor works quite slow.
Note: you don't need to write SlowStringProcessor. It will be added to your solution automatically.