There is a much better way of doing it, by taking the count variable out. This should also do it:
public static int displayOccu(int[] a, int n, int i)
{
if(i == a.length)
return 0;
else...
Type: Posts; User: aussiemcgr
There is a much better way of doing it, by taking the count variable out. This should also do it:
public static int displayOccu(int[] a, int n, int i)
{
if(i == a.length)
return 0;
else...
Are you wanting to simply count them or return an array of all of their indexes?