Last active
January 4, 2016 20:09
-
-
Save jasper-lyons/8672322 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomeClass { | |
public int someMethod(int[] data) { | |
//do some things | |
} | |
public int someMethod(Integer[] data) { | |
// this bit convert an Integer array into an int array. | |
int[] newData = int[data.length]; | |
for (int i = 0; i < data.length; i++) { | |
newData[i] = data[i].intValue(); | |
} | |
// this bit jsut calls the already defined method. | |
return this.someMethod(data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment