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()
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.
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.
To declare a string in Kotlin, we need to use double quotes(” “), single quotes are not allowed to define Strings.
\” — To print a double quote. \ — To print a backslash.
Use \"
for this
For example String str="\"Rajesh\""
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With