Convert Java String to Array

Posted by Bruce on Stack Overflow See other posts from Stack Overflow or by Bruce
Published on 2010-06-08T14:44:06Z Indexed on 2010/06/08 14:52 UTC
Read the original article Hit count: 228

Filed under:
|

This is a weird problem. Here is my code

 String reply = listen.executeUrl("http://localhost:8080/JavaBridge/reply.php); 

executeUrl returns as String object whatever is returned by the reply.php file. Now comes the problem. In reply.php I am returning an PHP array and reply is a String.

When I do

System.out.println("Reply = "+reply);  

I get

Reply =       array(2) {  [0]=>  string(14) "Dushyant Arora"  [1]=>  string(19
) "@dushyantarora13 hi"}

But reply is still a String. How do I convert it into a String array or an Array.

© Stack Overflow or respective owner

Related posts about java

Related posts about php