Disclaimer: Java Newbie On Board

Hey,
I'm creating a 3D Rat In The Maze problem, but Im creating a 2D version just for starters right now.
Anyway, I created my 2d array named maze with the values 0, 1, 2 and 5 where...

0 = a valid path
1 = a wall
2 = stairs up/down (not necessary since i'm doing just a 2d version right now)
5 = the starting point

I left my code as is, but it's incorrect...I'm not too sure on a few things.

Code:
import javax.swing.*;

public class Rat
{
	public static void main(String [] args)
	{
		int maze[][] = { {1,1,1,1,1}, {1,2,0,5,1}, {1,1,0,1,1}, {1,2,0,2,1}, {1,1,0,1,1} };
		startpoint(maze);
                // traverse_maze()  Is this needed???????
		System.exit(0);
	}

	//function startpoint determines where the rat's initial position is
	public static void startpoint(int a[][])
	{
		boolean flag = true;
					
		for( int row = 0; row < a.length && flag; row++)
		{
			for(int column = 0; column < a[row].length && flag; column++)
			{
				if( a[row][column] == 5 )
				   new int x[][] = a[row][column];  //this line was proved invalid
                                    flag = false;
			}
		
		} 
		System.out.println( x );  //incorrect
                traverse(x);
	}
	
}
Anyway, I created a function named starting point(int a[][]) that takes in the whole maze and scans it to search for the starting point. Once it finds the starting point, I want that specific row/column to be called up in maze[][], where I can begin traversing the maze.

Can I use another function in startingpoint() like, traverse(array) that will take that starting point found in maze?

If traverse works, will the passed array argument be set at the starting point, and will it include the rest of the 2d maze as well? Do I need a traverse() function, or can I do all of this in startingpoint()? How can I do this?