I AM NOT ABLE TO UNDERSTAND WHY THIS IS SHOWING ERROR.
package coding;
public class selection {
public static void main(String[] args) {
int a[]= {23,56,78,94,55,24};
bubbleSort(a);
for(int i : a)
{
System.out.print(a[i] + " ");
}
}
public static void bubbleSort(int b[])
{
for(int i=0;i<b.length-1;i++)
{
for(int j=0;j<b.length-1-i;j++)
{
if(b[j]>b[j+1])
{
int temp=b[j];
b[j]=b[j+1];
b[j+1]=temp;
}
}
}
}
}