I had a cannot find symbol error when I used length() for a string inside a function and got rid of it when i used length. I need to know what is the reason for this?
code:
//this got cannot find symbol error
static int[] matchingStrings(String[] strings, String[] queries) {
int n=queries.length();
int ns=strings.length();
int res[]=new int[n];
//this ran
static int[] matchingStrings(String[] strings, String[] queries) {
int n=queries.length;
int ns=strings.length;
int res[]=new int[n];