String[][] readMultipleRows(int numOfRows) { int i=0; int j=0; String[][] returnDataRows = new String[numOfRows][3]; try { if (store.getNumRecords() >0){ // it means the record store is not empty RecordEnumeration re = store.enumerateRecords(null, null, false); while (re.hasNextElement() && (i < numOfRows)){ returnDataRows[i][(j%3-1)] = new String(re.nextRecord()); if ((i % 3) == 1) i++; j++; } re.destroy(); } return returnDataRows; }catch (Exception e){ return returnDataRows; } }..//usagefor (int i=0;i<dataLast.length;i++){ for (int j=0;j<dataLast[i].length;j++){ append(dataLast[i][j]); //--------------------gives null }}