Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@yshavit
Created August 6, 2013 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yshavit/6165754 to your computer and use it in GitHub Desktop.
Save yshavit/6165754 to your computer and use it in GitHub Desktop.
import java.util.Arrays;
public class Arrs {
public static void main(String[] args) {
int[] is = {1, 2};
printit(is);
printit(args);
}
private static void printit(Object... os) {
System.out.println("Object[]: " + Arrays.toString(os));
}
private static void printit(int... is) {
System.out.println("int[]: " + Arrays.toString(is));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment