Skip to content
Advertisement

How to assign a text file’s lines of integers into 2D tables in Java?

I have the sample.txt which contains 100 Integers (range 0-9) in every line formatted like this:

JavaScript

I want to scan the file and put every line into a 10×10 table. So:

JavaScript

Advertisement

Answer

How about something like this?

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement