I have a method object.getType() returning Byte value. Later there is a check object.getType() == 1
. This is literal comparing, so value should be checked, not reference. When this check may give false(in case values are equal)?
Asked
Active
Viewed 53 times
0

Martin
- 767
- 2
- 9
- 21
-
Is this an interview question or do you have a real-life use problem you're trying to solve? – Abhijit Sarkar Jul 17 '17 at 22:33
-
Post your actual code. – shmosel Jul 17 '17 at 22:33