Created
September 16, 2012 05:32
-
-
Save kf4x/3731128 to your computer and use it in GitHub Desktop.
cool java bytes
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
//Want to remove element and who what element you removed | |
temp = element[size - 1]; | |
size--; | |
return temp | |
//this will return size of array then decrement | |
return element[--size]; | |
public boolean checker(){ | |
return size == 0; | |
} | |
//create a temp array with double the length | |
int[] = new int[elements.length * 2]; | |
//method to copy array | |
System.arraycopy(sourceArray, offset, target(temp), offset, elementsToCopy); | |
//reinitialize | |
elements = temp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment