Hi Rahul,
There is some problem with Javaranch editor. Sometimes it skips some part of the code. This is third time it has happened with me. I am not sure what the problem is. Now I am again sending the correct code. Hope this time it will post correctly.
Sorry for the trouble.
Thanks
class FindMinAr{
public static void main(
String [] args){
int dataseq []= {8,4,6,2,1};
int minValue = dataseq[0];
for(int index =1;index<dataseq.length; ++index)>
minValue= minimum(minValue,dataseq[index]);
System.out.println("Minimum Value: " + minValue);
}
public static int minimum(int i, int j){
return (i<=j)?i:j;
}
}