Home » Java » What is the most efficient way to make an array of integers out of a String in java-Exceptionshub

What is the most efficient way to make an array of integers out of a String in java-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

I have extracted a line of text from a file that is made up from integers separated by a space(using buffered reader). I was wondering what the most efficient way to get an array of those integers is! I tried “Scanner” but it was to slow for what I’m trying to achieve. I would like to know how to get that time down as much as possible.

How to&Answers: