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

October 2014

S M T W T F S
   1234
567891011
12131415161718
192021222324 25
262728293031 

My Picture

Recent Comments

0 user(s) viewing

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