class a
{
public static void main(String[] args)
{
int[]w={1,3,2,3,4};
int x=cha(w,2);
System.out.println(x);
}
public static int cha(int[] s,int k)
{
int x=0;
for (;x<s.length ;x++ )
{
if(s[x]==k)
{
break;
} else {
System.out.println(" ");
}
}
return x;
}
}
|