This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
This program sorts the numbers in a string array by using a bitset provided the numbers are unique. The program keeps track of which numbers have been seen by setting bits in a bitset. The output is printed by visiting all the elements in the bit set. The output should be like this: In sorted order: 2 9 10 21 43 45 52 66 68 71 87 This is the problem. I am not able to give the upper limit while accessing the elements in the bitset. I have given an arbitrary number 100 for now and the program is working. Is there any way to access the last element in the bitset.