Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0
-
None
-
None
-
Operating System: other
Platform: Other
-
16076
Description
The following is directly from the Javadoc page. Please see inline notes.
-
-
- Begin Quote ***
To use this class write code as follows:
- Begin Quote ***
-
public class Person {
String name;
int age;
boolean isSmoker;
...
public String toString()
{ return new ToStringBuilder(this). append(name, "name"). //!! should be - append("name", name). append(age, "age"). //!! should be - append("age", age). append(smoker, "smoker"). //!! should be - append("smoker", smoker). toString(); }}
-
-
- End Quote ***
-
In short, the order of arguments to the append method in the example have been
reversed.
Thank you.