I am working or understanding how to create a simple java 2d maze that should look like this:
int [][] maze =
{ {1,1,1,1,1,1,1,1,1,1,1
I know this is probably completely outdated, but...
First, you should realize that the underlying structure of such a maze is an undirected graph on a 2-dimensional grid. Now to create a so called "perfect maze", you just have to create any spanning tree of a full grid graph. And to do that there are plenty of algorithms, from random graph traversals (BFS, DFS) over algorithms derived from the known minimum-spanning tree algorithms (Kruskal, Prim, Boruvka, Reverse-Delete) to algorithms creating "uniformly random" spanning trees (Wilson, Aldous-Broder) to other algorithms that don't fit into these categories like "recursive division", "Eller's" etc.
I implemented lots of these algorithms based on a grid graph structure and you can find my implementation here:
https://github.com/armin-reichert/mazes