If statements within an array of digits

hello,

you don’t need to use the equals() method for the primitive types. just use == like

if (data[i] == 2) {
}
2 Likes