I want to know is there any method provided in Java to help us find the array element no. which has the smallest value among all. Eg. A = 1, A = 3, A = 0. Therefore, the smallest value is '0', and the element no is '2'. Thus, can I get the element no '2' by using any easy method.
There is no pre-existing method that will accomplish what you want, but you could write one yourself. Try using this code.
int findSmallestIndex( int arr, int length )
int nSmallVal = Integer.MAX_VALUE;
MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed.
The idea here is to target your cell phones with
This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java.