Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

"===" equivalent in Java

While comparing two values in Java, how do you test if both, the type and the value, are equivalent?

I know in JavaScript === can be used to accomplish this, so I tried that in Java, but it didn’t work.

I know this is a simple question, but I tried looking it up and I couldn’t find out what it was.

Answer*

Draft saved
Draft discarded
Cancel
1
  • 1
    So !(false == 0) is true Commented Jun 20, 2019 at 17:30

lang-java

AltStyle によって変換されたページ (->オリジナル) /