Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

add double quotes in string using android

I have string in forloop, I want add that in to another string like the given format

for (int i = 0; i < profiles.length(); i++) {
    JSONObject c = profiles.getJSONObject(i);
    String admnno   = c.getString(TAG_ADMNNO);
}

The result should be like this

"Rajesh", "Mahesh", "Vijayakumar"
or 
final CharSequence[] items = {"Rajesh", "Mahesh", "Vijayakumar"};

The adminno should be in double quotes and following comma. Its in android doin Background()

like image 581
Nidhin Sasankan Avatar asked Feb 06 '15 09:02

Nidhin Sasankan


People also ask

How do you display double quotes in a string?

To place quotation marks in a string in your code In Visual C# and Visual C++, insert the escape sequence \" as an embedded quotation mark.

How do you insert a double quote?

Double quotation marks on WindowsPress-and-hold the ALT key and then type 0147 for the opening single quotation mark and ALT followed by 0148 for the closing single quotation mark.

How do you put quotation marks on a string by Kotlin?

To declare a string in Kotlin, we need to use double quotes(” “), single quotes are not allowed to define Strings.

How do you print double quotes in Kotlin?

\” — To print a double quote. \ — To print a backslash.


1 Answers

Use \" for this

For example String str="\"Rajesh\""

like image 65
Ravi Avatar answered Oct 13 '22 13:10

Ravi