Here you can find the source of swap(T... args)
@SafeVarargs public static <T> T swap(T... args)
//package com.java2s; //License from project: Open Source License public class Main { @SafeVarargs public static <T> T swap(T... args) { return args[0]; }/* w ww.j a v a 2 s. c om*/ }