Strings are CharSequences, so you can just use Strings and not worry. Android is merely trying to be helpful by allowing you to also specify other CharSequence objects, like StringBuffers.
More Related Contents:
- Why String.replaceAll() in java requires 4 slashes “\\\\” in regex to actually replace “\”?
- How to convert a String to CharSequence?
- Exact difference between CharSequence and String in java [duplicate]
- How to convert CharSequence to String?
- Write a function that will sort a string array using Java
- String class replace() method [closed]
- Can you explain the output of the following source code?
- Replace a character at a specific index in a string?
- Determine if a String is an Integer in Java [duplicate]
- How can a string be initialized using ” “?
- Strings are objects in Java, so why don’t we use ‘new’ to create them?
- Why StringBuilder when there is String?
- How to sort an array of objects in Java?
- What is the backslash character (\\)?
- How to capitalize the first letter of a String in Java?
- How to convert hex string to Java string?
- Using Enum values as String literals
- compareTo() vs. equals()
- The concatenation of chars to form a string gives different results
- Java String Concatenation with + operator
- Correct way to use StringBuilder in SQL
- Java string searching ignoring accents
- Use Java and RegEx to convert casing in a string
- How to convert a Binary String to a base 10 integer in Java
- How is String in switch statement more efficient than corresponding if-else statement?
- Difference between String trim() and strip() methods in Java 11
- Java : Convert formatted xml file to one line string
- split string only on first instance – java
- How to use String.format() in Java? [duplicate]
- Extract digits from string – StringUtils Java