Check out example codes for "TreeMap floorEntry() method in java". It will help you in understanding the concepts better.

Code Example 1

import java.util.TreeMap;
public class TreeMapFloorEntryMethodExample
{
   public static void main(String[] args)
   {
      TreeMap<Integer, String> tm = new TreeMap<Integer, String>();
      tm.put(63, "orange");
      tm.put(50, "apple");
      tm.put(83, "watermelon");
      tm.put(86, "banana");
      tm.put(56, "mango");
      System.out.println("Check floor entry for 86: ");
      System.out.println("Value is: " + tm.floorEntry(86));
   }
}

Learn ReactJs, React Native from akashmittal.com