Adi Dinita

Greenhorn
+ Follow
since Oct 21, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Adi Dinita

With the note that this also applies to the Boolean wrapper class.

Ankit Garg wrote:for %b, if the value is boolean value false or null, then the output is false otherwise its true...

I don't believe he will find this kind of non-printable special chars in the tutorial.

Harikrishna, I believe this will help: http://www.regular-expressions.info/characters.html

Stephan van Hulst wrote:Have you read the Oracle tutorials? If you haven't, you probably will be familiar with a lot of it, but it can't harm to go over the topics which you don't fully understand again. These lessons are very clear:

http://download.oracle.com/javase/tutorial/

That's wrong, for two different objects you could encounter the same hashCode() (even though rarely, it depends on the implementation ).
Mind the "must" phrasal.

Harikrishna Gorrepati wrote:Hi Ankit, choice "A" [If !a.equals(b) then a.hashCode()!=b.hashCode() ]also should be correct know as per statement based on Last row in K& B book chapter 7 Page#554 [x.hashCode()! = y.hashCode() then x.equals(y) == false)]

In an instance variable initializer, you have only an equals sign and one expression and that's enough to initialize your variable. Also if you don't initialize it at the time of the declaration, it will get a default value (null in in this case). If you want to do additional things, they can be done in a constructor, or an initialization block.



or:


the offer()/add() methods only insert the element into the queue. If you want a predictable order you should use peek/poll which return the head of the queue.

For example: