D Burks

Greenhorn
+ Follow
since Jul 14, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by D Burks

Having your constructor take the dimensions of your array requires you to know what is inside your file. However, since the program is going to open the file and read these dimensions anyway, just let the program figure it out. All you need to know then is the filepath to the file and your program will do the rest. Thus I modified the code to take advantage of this. Also, as Aly had said using the split method from the String class is much simpler.



Then you can call your printTable(), smallest() and largest() methods. Here's how I called it :


and the output:



The first four lines are from the println() on line 28. I was using that to debug and forgot to remove it. That should be removed
11 years ago