I have a Json String and I am trying to convert it to an array in Java.
public void DisplaySubjects(String subjects)
{
JSONObject jsonResponse;
You need to make JSON object first.
For example,
JSONObject jsonObject = new JSONObject(resp);
jsonObject may contains other JSON Objects or JSON array.
How to convert the JSON depends on the String.
There is a complete example with some explanation about JSON String to JSON array can be found at http://www.hemelix.com/JSONHandling.