I have been getting a null pointer exception at the split statement. I have initialised all_data1 variable, which when using a split must be an array. Please suggest what am I doing wrong... This is the code for your reference...
test_cases = t_inp.nextInt(); //input test cases
for(i=0;i<test_cases;i++)
{
String all_data = "";
all_data = d_inp.readLine();
all_data1 = all_data.split("\\s+");
up_bnd[i] = Integer.parseInt(all_data1[i]);
lw_bnd[i] = Integer.parseInt(all_data1[i+1]);
Arrays.fill(all_data1, "");
System.out.println(up_bnd);
System.out.println(lw_bnd);
}