This is too unspecific to respond to.
An Object with CharSequence as type is effectively a read-only data
structure,fundamentally, the only thing you can do with it is access a
character at a particular position. A String is also a CharSequence,
and it is immutable. In neither case would need making a copy to scan
the text an instance contains.
I think you are looking in the wrong direction to find out what happens,
the concept of a pointer is completely irrelevant in thinking about
Java. An object is an object and it is passed into a method as just
that. How the passing is done is of no concern in any errors that may
Please provide the exceptions and a minimal scenario on how to get these
exception(s). Then it might be possible to find what is happening.
> [b]Do the classes java.util.regex.Pattern and java.util.regex.Match ,
> despite java's lake of pointers and references, work upon
> a reference to the CharSequence string, or a full copy?[/b]
> I've been able to generate exceptions in pattern matching by setting
> the submit search string to null afterwards, and I might like to know