arrays - int cannot be converted to int[] -


i'm counting of specific numbers in array keep receiving error int cannot converted int[].

the variables val , two have been defined in program before, not error.

public static int[] removeval(int[] two, int val) {     int count=0;     (int a=0; a<two.length; a++)     {         if (two[a]==val)             count++;     }     return count; } 

the method returns array of ints, returning int, not array of ints.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -