Question: How do you read a PGM file's matrix into a 2D array in Java? It doesn't seem to be in a list format already despite
How do you read a PGM file's "matrix" into a 2D array in Java?

It doesn't seem to be in a list format already despite how it looks, so I'm a bit confused on what to do.
Here is an example of a small image in the plain PGM format. 9 9 P2 # feep.pgm 24 7 15 0 3 3 3 3 3 3 3 3 0 3 0 0 0 0 0 3 7 7 0 momo 0 7 7 7 7 7 0 0 7 0 0 7 0 0 0 0 0 0 0 0 0 11 11 11 11 0 11 0 11 11 11 0 0 11 0 0 11 11 11 11 0 0 0 0 0 0 15 15 15 15 0 15 0 15 0 15 15 15 15 0 15 0 0 15 0 0 0 7 0 7 0 0 0 0 7 7 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
