Notable things in java

No support for unsigned integers (Other than char). 
int[] test = new int[-1]; // Negative sized Array Exception

IdentityHashMap: violates Map contracts by using reference equality (not .equls()) during put/get operations

Math.abs() returns absolute value  except if the argument is equal to the value of Long.MIN_VALUE, the most negative long value, the result is that same value, which is negative (This is due to overflow).

You cannot initialize static final field with in constructor, because construtor is called for every instance created and the static final field will get initialized on every instance. [this is obvious but you still can’t, even if your intent is to create a single instance by making the constructor private, ofcourse you still can create multiple instances with in the declaring class.]

Unlike HashMap Concurrent Hash Map (CHM) & ConcurrentSkipListMap (CSLM) doesn’t take null keys or values.

null is not an instanceof any java type.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s