First of all: you have to be careful with the term “peer class”, because in Java it has a clear meaning: peer classes are “interfaces” to native classes. (e.g. C ++ class) (see other anchors for details)
In your case, the term does not look for use in this particular context!
The one who called the StringBufferpeer class Stringexplicitly used this word in a general sense. In some way StringBufferthey Stringare connected, and both of them can be used for similar purposes. I suggest that in some cases they can be considered peers in the broader sense of the word.
source
share