class sortt
{
public static void main(String args[])
{
String []a={"rawezh","ehsan","hewa","kawan"};
A ob=new A();
ob.B(a);
for(int i=0;i<a.length;i++)
System.out.print(a[i]+" ");
}
}
class A
{
public static void B(String[]a)
{
int n=a.length;
for(int i=1;i<n;i++)
{
String c=a[i];
int j=i-1;
while ((j>=0)&&(a[j]>c))a[j+1]=a[j--];i have error in this line
a[j+1]=c;
//System.out.print(+" ");
}
}
}