PDA

View Full Version : Can you add methods to existing classes?



Trinithis
06-26-2007, 03:41 AM
Can you add methods (or variables) to existing classes? What about overring some. If so how?

For example, a use could be to change the toString() method for all arrays to display a comma delimited string representation of its elements.

Twey
06-26-2007, 07:43 AM
No, but you can subclass and override the behaviour.