public class Main {
public static void main(String args[]) {
int arr[]= {3,3,0,7,3,7};
int p[]= AllIndex(arr, 0, 7) ;
System.out.println§;
//System.out.println(“hello”);
}
public static int[] AllIndex(int[] arr, int n, int data)
{
int arr1[]={};
if(n==arr.length)
return arr1;
if(arr[n]==data)
{
arr1.add(n);
return arr1;
}
int p[]= AllIndex(arr, n, data);
return p;
}
}