Anuraag Kumar wrote:Am unable to understand the above quote. Please do correct me if am wrong. Suppose if I take String s = "password"; Then if I later change it to s = "Password2", then s will be referring to "Password2" right. Am aware that in this scenario a new object is created and assigned to s. But I was able to change it correct? Appreciate your kind help for this query.
Utpal Kumar wrote:I could find toString() method overloaded in any collection class or Interface...
Oracle wrote:Returns a string representation of this collection. The string representation consists of a list of the collection's elements in the order they are returned by its iterator, enclosed in square brackets (""). Adjacent elements are separated by the characters ", " (comma and space). Elements are converted to strings as by String.valueOf(Object).
Ioannis Michailidis wrote:The current Polygon class is simply Polygon You are suggesting I should mess with it (how?)
kennith stomps wrote:Clearly the first and last names aren't single things, "it" was as in return the method. In my code does it look at all as if I am attempting to return a "single thing"? No, not at all, what a nonsense answer.
kennith stomps wrote:I am simply trying to have the concatNames method get the first and last name from the user, and pass it to the main method once it is called.
Ioannis Michailidis wrote:Well, this point lies in the core of the question. I think that a SuperTriangle with some virtual vertices is a Superclass of a normal triangle and not vice versa. I am afraid if I simply extend Polygon, consequently bad things will happen.
Is there no pattern in which a subclass "becomes" a superclass?
Garrett Boring wrote:Well the final hasn't had a number assigned to it so it's just zero and the string...args should be String args, I believe. Hope this helped you out!