Method chaining is popular thing now, introduced by Martin Fowler and you probably seen it somewhere already, you can read about it here.
Generaly it looks like:
contrary to classic Java style
HardDrive hd = new HardDrive();
Today I found one funny issue with it. I got bug in this code:
Of course, bug is trivial and easily found with debug. But what is bad with this bug, syntax is correct, so it is not discovered by IDE and it is not easily visible. For example, compare it to old style:
Node node = new Node();
Another minor bonus is that it is also easier to debug.