Skip to content

Instantly share code, notes, and snippets.

@JarrettBillingsley
Created September 25, 2018 20:26
Show Gist options
  • Save JarrettBillingsley/f66dfae447d7061e225868b8601f90eb to your computer and use it in GitHub Desktop.
Save JarrettBillingsley/f66dfae447d7061e225868b8601f90eb to your computer and use it in GitHub Desktop.
void doStuff(int[] array) {
for(int i = 0; i < array.length; i++) {
System.out.println(array[i]);
}
if(array.length > 1) {
array[0]++;
array[1]++;
}
int count = 0;
for(int i = 0; i < array.length; i++) {
for(int j = 0; j < i; j++) {
if(i != j && array[i] == array[j]) {
count++;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment