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 -

c++ - How to test/verify that zero-initialization takes place -

node.js - Webpack/TypeScript Raising Errors When node_modules is Excluded -