I have a "String line " variable in java when I give
System.out.println(line);
It gives me output as
233 81 335 332 165 56 82 316 123 247 328 348 177 89 86 1 252 228 34 350 116 91 193 106 272
121 56 203 179 259 25 163 101 77 116 135 29 257 254 400 195 192 20 59 270 350 116 92 6 87
22 230 126 207 393 73 399 57 96 93 9 196 172 111 192 234 315 59 35 351 390 239 88 339 145
17 161 330 328 198 47 194 107 231 312 260 118 369 344 114 355 99 117 199 219 5 255 336 124
The above output is 4 separate lines.
Now I want to convert this string to int array, such that every location of the integer array will hold these numbers. I tried Tokenizing and parsing it, but when the data is very big nearly 200000 lines of record, it gives me a error.
Any Suggestions? Pls Help.
String#splitandInteger.parseIntStringI guess, you could useif (!value.trim().isEmpty()) { // Convert to int, wherevalueis an indvidual element