[Solved] I pass a string -> NullPointerException [duplicate]


titlelist is not initialized.

You need to initialize it prior to assigning Strings to it :

String[] titlelist = new String[titles.size()]; // assuming Elements has a size() method

1

solved I pass a string -> NullPointerException [duplicate]