How can I split the following word in to an array
That's the code
into
array
0 That
1 s
2 the
3 code
I tried something like this
String str = "That's the code";
        String[] strs = str.split("\\'");
        for (String sstr : strs) {
            System.out.println(sstr);
        }
But the output is
That
s the code
 
     
     
     
     
     
     
     
    