title: Object reference in java
body: <p>consider this simple servlet sample:</p>
  
  <pre><code>protected void doGet(HttpServletRequest request, HttpServletResponse response){
      Cookie cookie = request.getCookie();
      // do weird stuff with cookie object
  }
  </code></pre>
  
  <p>I always wonder.. if you modify the object <code>cookie</code>, is it by object or by reference? </p>