i want to return the array E to the main method buh it won't return is there something wrong with equals method...(my display method wrks perfectly fine)
*main method*
E=edit (n4,E,c,B);
display (D,E,A,B,C);
*edit method*
public static int[] edit (int n4,int []E,String c,String []B){
for (int i=0;i%26lt;E.length;i++){
if (B[i].equals(c)){
E[i]=n4;
}
}return E;
}
How do u use the equals method in java?
B[i].equals(c) there is a dot between B[i] and equals, is it r8. Or you may try: B[i]==(c)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment