Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help! How to read a .txt file into a Java class and make 2D array?

807597Nov 30 2004 — edited Jan 11 2005
Hi guys,

Im a newbie with arrays, just started really using them.. please bear with me if I don't seem to understand much..

I have a .txt file that contains either a square or rectangle (random width and length).. How can I read each line into a Java class into a 2D array with rows and columns?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 8 2005
Added on Nov 30 2004
15 comments
3,457 views