You should use
int [] stringIds = { R.string.q1, R.string.q2... }
As when you declare the string [], you call getString(id), where some context or resource is needed, but not yet initialized, that accounts for the null error.
e.g.
getResources().getString(R.string.q1); //here getResources() may be null.
Then after your context (e.g. activity) is created, call below function
for( int id : stringIds)
String question = getResources().getString(id); //now this is no longer null
The difference is R.string.q1 always accessible, either at compile time or at runtime.
Hope this helps.