This week's book giveaway is in the Reactive Progamming forum. We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line! See this thread for details.
After the constructor of A is passed sa, the sa of both objects A and B point to the same object. When the code in class B modifies the sa in B, it's modifying the same object on the heap referred to by the reference sa in the object instance of A.