r/javahelp • • Apr 01 '22

help with java code

hi i’m trying to write code for an assignment and a part of my code (i < drywet.length && i < wetwet.length) are underlined red. it says “the operator < is undefined for the argument type(s) int, Object”

can someone please explain what i need to do to fix it?

0 Upvotes

14 comments sorted by

View all comments

2

u/wildjokers Apr 01 '22

There is not enough code posted to help. Please take a look at the automod message.

We need much more code that at least shows declaration of i, drywet, wetwet. And if drywet and wetwet are custom objects we need to see at least the field declarations in those.

The error says you are comparing an int to an object. You can’t do that. Without more code though we can’t help you figure out what is wrong.