You are viewing a single comment's thread. Return to all comments →
Can someone explain to me while the following code only returns zeroes (JAVA):
public int computeDifference(){ Arrays.sort(elements); int len = elements.length-1;
int maximumDifference = Math.abs(elements[0] - elements[len]); return maximumDifference; }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 14: Scope
You are viewing a single comment's thread. Return to all comments →
Can someone explain to me while the following code only returns zeroes (JAVA):
public int computeDifference(){ Arrays.sort(elements); int len = elements.length-1;