Hello my question is about double formatting within Stringbuilder.
StringBuilder autoSB = new StringBuilder();
autoSB.append( super.toString( ) )
.append( "\nI own a ")
.append( getMY( ) )
.append( " ")
.append( getMM( ) )
.append( ", My VIN is ")
.append( getVin())
.append( ". I paid $")
.append( getAmount( ) )
.append( " with a deductible of $")
.append( getDeductible() )
.append( ".00.\n");
Output:
I own Policy#: AS14325, insuring Sue Bates, with a premium of $300.00. I own a 2001 Ford Focus, My VIN is N1029345G9V1249P4. I paid $11000, with a deductible of $1000.00.
Wanted Output:
I own Policy#: AS14325, insuring Sue Bates, with a premium of $300.00. I own a 2001 Ford Focus, My VIN is N1029345G9V1249P4. I paid $11,000.00, with a deductible of $1,000.00.
How on earth do I format doubles in stringbuilder?
V/R
Gill Bates