Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Reading file and making an Array

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I've gotten very stuck on creating a program that will solve mazes. The user inputs the name of the file and it produces a maze of length (6,10), or (10,15) so I think I have to use an arraylist. How do I go about converting the text to an array?
Here is what I have written solving the maze is actually completed in another class:



Here is an example maze:
6 10
 
Ranch Hand
Posts: 34
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Looks like a duplicate post, but with more details about the context of question.

https://coderanch.com/t/598716/java/java/File-input
 
Suresh Sajja
Ranch Hand
Posts: 34
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Alex Munoz,

From this post and your previous topic, i understand that you are looking for help on
1. reading a file.
2. Storing the maze in an array.

To get you started, please go through the tutorial on I/O streams.
 
Marshal
Posts: 75631
354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please continue the discussion in the other thread quoted.
 
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
    Bookmark Topic Watch Topic
  • New Topic