title: Learning Algorithms on myself, how do you implement tuples in java?
body: <p>I'm teaching myself algorithms and I'm sorry if my title is incorrect! I don't understand how to implement this in Java.</p>
  
  <pre><code>if x = 0: 
  return (q,r) = (0,0) 
  (q, r) = divide(⌊x/2⌋, y)
  q=2·q, 
  r=2·r
  if x is odd: r=r+1 
  if r≥y: r=r−y, q=q+1 
  return (q, r)
  </code></pre>
  
  <p>I don't know how to implement the following parts in Java.</p>
  
  <pre><code>(q,r)=(0,0)
  (q,r)=divide(⌊x/2⌋, y)
  return (q,r)
  </code></pre>