public static void main(String[] args) {
int arr[]=new int[5];
Scanner in=new Scanner (System.in);
System.out.println("enter the array");
for(int i=0;i<arr.length;i++)
arr[i]=in.nextInt();
int c =differenceBetween(arr);
System.out.println("output"+c);
}
public static int differenceBetween(int arr[])
{int max=0,min=0,c;
for(int i=0;i<arr.length;i++)
{
if(arr[i]>max)
max=arr[i];
else if(arr[i]<min)
min=arr[i];
}System.out.println("check minimum"+min);
return c=max-min;
}
}
iam newbie in java..so help me out from this problem..it is not showing the minimum value