pastebin

Paste Search Dynamic
Recent pastes
List hex
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. public class Main
  9. {
  10.         public static void main (string[] args) throws java.lang.exception
  11.         {
  12.                 List<String> hex = arrays.asList("30","8","3A","FF");
  13.                 collections.sort(hex);
  14.                 for(string value: hex){
  15.                         system.out.println(value);
  16.                 }
  17.                 int x = collections.binarySearch(hex,"8");
  18.                 int y = collections.binarySearch(hex,"3A");
  19.                 int z = collections.binarySearch(hex, "4F");
  20.                 system.out.println(x+" "+y+" "+z);
  21.         }
  22. }
Parsed in 0.014 seconds