Passing and Returning StringBuilders: Java
<p>I was referred to this site by a friend.  I like that I was able to look at some similar threads before I started this thread.  Unfortunately, I didn't see anything about this specific issue.</p>

<p>I'm having an issue passing StringBuilders from object to object in Java.  I don't know what the problem is and am lost.  I can pass and return data all day.  With StringBuilders, it just doesn't work.  I'm thinking it's something really easy that i'm simply too frustrated to see.</p>

<p>I have a homework assignment which asks me to declare 3 Stringbuilders with my first name, middle name, and last name.  No problem.</p>

<p>It also wants 3 objects to do different formats of the name.  The formatting portion is easy.  I can't figure out how to return the work back to the main.</p>

<p>Here's a snippet:</p>

<pre><code>public class Builder
{
   public static void main(String[] args)
   {
      StringBuilder str1 = new StringBuilder("John");
      StringBuilder str2 = new StringBuilder("Que");
      StringBuilder str3 = new StringBuilder("Doe");

      ???  = entireName(str1, str2, str3);
   }

  public static String entireName(StringBuilder s1, StringBuilder s2, StringBuilder s3)
  {
        System.out.print(s1);
        //insert.s1('4', ' ');//format stuff, not really necessary (not a problem).
        Ststem.out.print(s2);
        //etc..
        System.out.print(s3);
        return ????;
   }
}
</code></pre>

<p>the question marked stuff isn't filled in because nothing I put in there worked anyway.  I've tried declaring separate strings to pass back.  I've tried declaring the strings, then using those strings in the stringbuilder.  I've got nothing.  The formatting portion of this stuff is easy.  If I can't return to the main, it's wrong.</p>

<p>I really appreciate any help.  Thank you!</p>
