title: Does call-by-sharing and call-by-reference differ only while multithreading?
body: <p>If a function is called using <code>Call-by-Reference</code>, then any changes made to the variable inside the function are affected immediately to the caller. And for <code>Call-by-Sharing</code>, it is affected at the end of the function.</p>
  
  <p><strong>Question 1:</strong> Does Java uses <code>Call-by-Sharing</code> instead of <code>Call-by-Reference</code>?</p>
  
  <p><strong>Question 2:</strong> I think that <code>Call-by-Sharing</code> differs from <code>Call-by-Reference</code> <strong>only</strong> while multithreading. It is created only to decrease concurrent over-writing of values while it is being used in some other thread; to provide consistency. Am I right?</p>