And more refactoring
1. Make the code follow the naming and code convention (Shift+F6 for refactoring). 2. Take a look at the methods of the ConcurrentMap class. 3. In the "String previousEntry = null;" line, call a method on concurrentMap that inserts a pair (randomInt, text) only for a key that is not in concurrentMap.
Fix the bug in the getValueByIndex() method. Read the supplementary article about the special features of autoboxing.