Well, I don’t know Java (have looked into it, but didn’t like what I saw the last time I tried), but I would approach it as:
Data structures: use a 2D array to store the map. Use a linked list to store your current path. Use another 2D array to store failed paths (dead ends, and the like) (or create a class to store in the original array that has all the necessary attributes)
Since we don’t know anything about the map, I don’t think Dijkstra’s or A* will work (somebody may be able to correct me on this, though). I’m sure there’s a better algorithm out there, but it might go something like:
1.) From current position pick a direction (make sure current position is stored in the linked list).
2.) If that direction is a wall, mark that tile in the dead end path and return to (1) picking a new direction and mark the chosen direction as dead/wall.
3.) If its not a wall, then move to that square, and add the new position to the linked list.
4.) Continue this (perhaps in one direction) until you hit a wall. You can then back track through the linked list until you hit a square that has unsearched directions (be sure to remove dead squares from the linked list and mark them in the 2D array so they won’t be searched again).
5.) Continue to repeat this general algorithm, but consider some of the special cases like how do you make sure you aren’t in a cycle (looking at the same squares over and over), what constitutes a truly “dead” square, etc. These will be a major determinant of what data structures you need exactly to be efficient here (think about costs for searching data structures, etc.).
You could probably do this recursively if you needed to (though, there’s no reason you can’t loop it). Most of it will be very generic programming anyways, so I doubt it will require more knowledge than functions/classes, data structures, for/while, loops, etc. (basic functionality).
When you find the “Goal” square all you have to do is read out your linked list to get the path from start to end. It didn’t say anything about shortest path, or the possibility of there being multiple paths through the maze, so I assume only one iteration is necessary. If not, I trust you know how to deal with those.
In general its not “right” to post for homework help, since it won’t help you in the long run, so I strongly suggest that you figure out the rest and make absolutely sure you understand what’s going on in case this pops up again in some incarnation. I don’t feel toooo bad since I just went over general concepts, though.