Thank you all folks for all the solutions and proposals, really appreciated.
This the code (done in three classes).
First the bubble sort code an Algorithm for sorting values, in this from min to max;
The bubble code was for a binary search, this is the code for binary search (iterative way);
No you guys are in charge of working the main class. Thank you all for your collaboration.