I was sent to this site by a friend. I like that I was able to look at some of these threads before I started this thread. Unfortunately, I have not seen anything about this particular problem.
I am having a problem passing StringBuilders from object to object in Java. I do not know what the problem is, and I got lost. I can transfer and return data all day. With StringBuilders this just doesn't work. I think itβs really simple, that Iβm just too upset to see.
I have a homework that asks me to declare 3 Stringbuilders with my first name, first name and last name. No problems.
He also wants 3 objects to perform different name formats. The formatting part is simple. I canβt understand how to return work to the main thing.
Here is a snippet:
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);
Ststem.out.print(s2);
System.out.print(s3);
return ????;
}
}
, , , . . , stringbuilder. . . , .
. !