How to implement Dijkstra algorithm for 2D array in Java ?!
what is in the array ? is it an adjacency matrix ?
you should find many resources on the internet to help you with that.
http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
have a look in the “external links” section :

Open Source Java Graph package with implementation

Java Implementation of Dijkstra’s Algorithm on AlgoWiki

A Java library for path finding with Dijkstra’s Algorithm