zParacha.com

Effective programming and blogging tips by Zaheer Paracha

Subscribe:

Posted by Zaheer 16 COMMENTS

In Java you can find maximum or minimum value in a numeric array by looping through the array. Here is the code to do that. public static int getMaxValue(int[] numbers){ int maxValue = numbers[0]; for(int i=1;i < numbers.length;i++){ if(numbers[i] > maxValue){ maxValue = numbers[i]; } } return maxValue; } public Continue Reading »

categories: Java
Posted by Zaheer 1 COMMENT

Sorting an array in Javascript is a snap. You create an array and then call sort() method on that array. The Javascript sort() method sorts an array in lexicographical order. This method is very useful in sorting alphanumeric values of an array. However, sort() will not work if the array Continue Reading »

categories: Javascript

Search

Sponsors

Get Adobe Flash playerPlugin by wpburn.com wordpress themes