You are getting a NullPointerException because you are trying to access an Array which has not been initialized, it is currently NULL. Before you access the Array element you need to make sure it is initialized e.g.
String arr = new String
this will then allocate an Array object in the Heap memory with 1 space where you can then assign youre String data. arr = s;