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

4

u/chickenmeister Extreme Brewer Apr 01 '22

It's hard to give an answer without more information; but the error message is saying that you're trying to compare an int to an object. So I'd recommend double checking that drywet.length and wetwet.length are actually numerical values, rather than some kind of object.