Why are you doing this?
int beg=data[0];// wrong actually you are assigning value here but you should assign index.
//So do,
int beg=0;
int end=data.length()-1;
Type: Posts; User: Mr.777
Why are you doing this?
int beg=data[0];// wrong actually you are assigning value here but you should assign index.
//So do,
int beg=0;
int end=data.length()-1;
mid=(end+beg)/2
not mid=(end-beg)/2;
1. Post your code in code tags.
2. Try learning indentation from here.
3. You are assigning the values to the variables beg, end, data values of array, not actually the index of array.
4. You...