Possible Duplicate:
Assigning an array to an ArrayList in Java
java: how to convert this string to ArrayList?
How to convert a String into an ArrayList?
I have this String
:
["word1","word2","word3","word4"]
The above text is not an array, but a string returned from server via GCM (Google Cloud Messaging) communication. More specific, inside a GCM class i have this:
protected void onMessage(Context context, Intent intent) {
String message = intent.getExtras().getString("cabmate");
}
The value of the String
message is ["word1","word2","word3","word4"]
Is there a way to convert it in List
or ArrayList
in Java?