title: Java consecutive method calls
body: <p>So I've seen, in many places, calling methods of a class like:</p>
  
  <pre><code>SomeClass obj = new SomeClass();
  obj.addX(3).addY(4).setSomething("something").execute();
  </code></pre>
  
  <p>I don't think I completely understand how that works.  Is each method independent of each other, so the above is equal to:</p>
  
  <pre><code>obj.addX(3);
  obj.addY(4);
  obj.addSomething("something");
  obj.execute();
  </code></pre>
  
  <p>Or are they designing their class structure in some other fashion that allows for this.  If they are how are they designing their classes to support this?</p>
  
  <p>Also, does that have a specific name?  Or is this just calling methods on a class?</p>