Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

method swap to the Pair class of that swaps the first and second elements value of the pair in generic Pair class in java

public Pair<U,T> swap() {
  return new Pair(second, first);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #method #swap #Pair #class #swaps #elements #pair #generic #Pair #class #java
ADD COMMENT
Topic
Name
6+3 =