2 Replies Latest reply: Feb 26, 2013 8:40 AM by Murray9654 RSS

    basic problem?

    Murray9654
      Hi while going through docs i found the following method
      public static <K, V> boolean compare(Pair<K, V> p1, Pair<K, V> p2) {
              return p1.getKey().equals(p2.getKey()) &&
                     p1.getValue().equals(p2.getValue());
          }
      I am not able to understand why they have defined <K,V> infront of the return type boolean? how to understand this and what is the meaning of this?

      Edited by: Muralidhar on Feb 26, 2013 4:53 PM