android - 使用android在字符串中添加双引号

标签 android string concatenation

我在 forloop 中有一个字符串,我想把它添加到另一个字符串中,就像给定的格式一样

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

结果应该是这样的

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

adminno 应该用双引号和逗号括起来。它在 android doin Background()

最佳答案

为此使用\"

例如 String str="\"Rajesh\""

关于android - 使用android在字符串中添加双引号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28361995/

相关文章:

android - 是否可以为设备上运行的 android/iOS 应用程序分析 adobe AIR?

android - 哪个是在一个插槽中发送 50mb 数据或以任何其他方式向 android 中的服务器发送 50mb json 数据的好方法?

scheme - 将函数映射到列表列表并将结果连接到列表中

r - 连接没有重复的数据框 r

google-sheets - Google 表格行到数组

android - 如何制作启动画面并在后台运行 ListView 进程?

安卓开发 : Unable to create an icon @drawable/ic_action_search

java - 将字符串中的整数提取到数组中

swift - 基于多个字符串定界符拆分字符串的高效算法

android - 在 ListView 中创建数组