Is there something in Java that will perform the + or - operation? I need to compare a couple variables but the variables are not going to be exact, they'll be off by about +or- 2.
SnagglezMaw
0
Newbie Poster
Recommended Answers
Jump to Post
Math.abs(a-b) < 2
All 2 Replies
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.