class Main {
public static void main(String[] args) {
int[] a = {2,5,6,2,5,4};
System.out.println(a[1]);
selectsort(a);
System.out.println("Hello world! - java.jsrun.net ");
System.out.println(a[1]);
}
public static void selectsort(int[] a)
{
int n = a.length;
for (int k=0;k<n-1;k++)
{
int min = k;
for (int i=k+1;i<n-1;i++)
{
if (a[i]<a[min])
min = i;
}
if(k!=min)
{
int temp = a[k];
a[k] = a[min];
a[min] = temp;
}
}
}
}