string to charsequence

user611089 picture user611089 · Apr 28, 2011 · Viewed 42.2k times · Source

Can somebody please show me a bit of code to convert a string to charsequence?

Answer

MByD picture MByD · Apr 28, 2011

String implements the Interface CharSequence, so String is a CharSequence.

And you may never instantiate interfaces. Wherever CharSequence is required, String will fit.