<p>I was really looking at the differences between pass by value and how Java allocates objects and what java does to put objects on the stack.</p>

<p>Is there anyway to access objects allocated on the heap?  What mechanisms does java enforce to guarantee that the right method can access the right data off the heap?</p>

<p>It seems like if you were crafty and maybe even manipulate the java bytecode during runtime, that you might be able to manipulate data off the heap when you aren't supposed to?</p>

All objects in Java are located on the heap.  I'm not quite sure what you mean by "access objects from the heap".  The only things stored on the stack are the list of functions which called into the current context and their local variables and parameters.  All local variables and parameters are either primitive types or references.
If you allocate an object using
```
new
```
(which is the only way to allocate non-primitive types; yes this includes array types), then the object is allocated on the heap, and a reference to that object is stored on either the stack or the heap, depending on if the reference is stored in a local variable/parameter or as a member of another object.
When passed as parameters to functions, all objects are passed by reference - if the function modifies the parameter, the original object is also modified.  Identically, one could also say that the object references are passed by value - if you change a parameter to refer to a new object, it will continue to refer to that object for the duration of the function, but the original object which was passed in will still refer to whatever it referred to before.  Primitive types are also passed by value.