Possible Duplicate:
Is Java pass by reference?
I need to modify the content of a variable that is passed to a function within that function.
The type is String. I want to inject a preceeding char when using the insertString function of an extendeded class of PlainDocument.
Use a wrapper class:
You can use it like:
OUTPUT:
Also see this answer: https://stackoverflow.com/a/9404727/597657