You are viewing a single comment's thread. Return to all comments →
peek() method returns an Integer object here and "==" compares two object references ie if the refer to the same object in the memory
.equals() method compare the "value of two object"
Seems like cookies are disabled on this browser, please enable them to open this website
Maximum Element
You are viewing a single comment's thread. Return to all comments →
peek() method returns an Integer object here and "==" compares two object references ie if the refer to the same object in the memory
.equals() method compare the "value of two object"