Is there a way to output variables as Java sees them so I can isolate methods for testing or asking for assistance?
<p>I'm learning Java and find myself sending methods around while asking for help but my problem is I have many methods and the data is modified at each method.  I often have to send large files when only one area is relevant(it makes my SO questions excessively long as well).  </p>

<p>But for some of the stuff I do, I can't get the right data format to be outputted as string that I can input later. For example, if I add data to a list of Points(like this, <code>(new Point(0, 0));</code>) then when I output the results I get something like this(with sample data):</p>

<p><code>[java.awt.Point[x=970,y=10], java.awt.Point[x=65,y=10], java.awt.Point[x=729,y=10]</code></p>

<p>I get errors when I assign this to a variable and send it to my method I want to test/show.  I basically have two goals:</p>

<ol>
<li>If I want help on a single method(thats part of a much larger class), I want to be able to send the least amount of code to the person helping me(ideally just the method itself and the inputs..which I'm unable to capture exactly right now).</li>
<li>When I test my code, I would like a way to isolate a method so I don't have to run a large file when all I can about is improving one method.</li>
</ol>

<p>I am pretty sure I'm not the first person to come across this problem, How can I approach this?</p>

<p>UPDATE: Here's an example, </p>

<pre><code>double[] data = new double[] {.05, .02, -.03, .04, .01}; 
System.out.println(data); //output is: [D@13fcf0ce 
</code></pre>

<p>If I make a new variable of this and send it to a method I get errors.  I have 30 methods in a class. I want to have a friend help me with one. I'm to avoid sending 29 methods that are irrelevant to the person. So I need a way to capture the data, but printout doesn't seem to capture it in a way I can send to methods.</p>
