Subscribe to Stupid Java Tricks        RSS Feed
- - - - -

Quick post about "==" operator

Icon 2 Comments
Here's a quick "gotcha" about which you might not have known. Consider the following code:

Integer i1 = 200;Integer i2 = 200;String s = (i1 == i2) ? "equal" : "not equal";System.out.println(s);


What is the output? That's an easy one, right? The output is not equal...

Page 1 of 1

Recent Entries

November 2014

S M T W T F S
      1
2345678
9101112131415
16171819202122
2324252627 28 29
30      

My Picture

Recent Comments

0 user(s) viewing

0 Guests
0 member(s)
0 anonymous member(s)