Java Number Swap swap(T a, T b)

Here you can find the source of swap(T a, T b)

Description

swap

License

Open Source License

Declaration

public static <T> void swap(T a, T b) 

Method Source Code

//package com.java2s;

public class Main {
    public static <T> void swap(T a, T b) {
        T temp = a;//w w  w. java 2s  .co  m
        a = b;
        b = temp;
    }
}

Related

  1. swap(short myShort)
  2. swap(short value)
  3. swap(short x)
  4. swap(String str, int i, int j)
  5. swap(StringBuffer s, int i, int j)
  6. swap(T... args)
  7. swap16(final int aValue)
  8. swap16(short rgb)
  9. swap32(int rgb)