another one is back ward direction. when two indexes are equal program will be terminated how can achieve this?
I wrote some peace of code in that not enter into if condition it is allways false how can you make it as true?
public class ArraysTest {
public static void main(
String args[])
{
int a[]={1,2,3,4,5,6,7,8,9,10};
int b[]={1,2,3,4,5,6,7,8,9,10};
int len=b.length-1;
for(int i=0;i<a.length;i++){
if(i==len){
System.out.println("hello");
break;
}
System.out.println(a[i]);
System.out.println(b[len]);
len--;
}
please help me>