I am making a small project. I have a integer inum
, and a array of strings fill
. I am trying to see which part of the array fill
is equal to inum
. Here is my code below:
String input = scan.nextLine();
int inum = Integer.parseInt(input);
for(int k = 0; k < 9; k++){
String cool = "hello";
cool = "" + inum;
if(fill[k] == cool){
fill[k] = "0";
It seems that the computer is not changing fill[k]
to 0. Does anyone know why this is so? Help is appreciated!