ENUM Memory usage in Java

A quick memory-related question about enums in Java!

Supposing I had a 2-dimensional array of an enum type:


TileFlag[][] flags;

How much memory might it take to store an array of 10 x 10 (100) elements?

What about 1000? A million? More? Does it scale linearly?

So would I get away with doing something like this:


TileFlag[][] flags = new TileFlag[5000][5000];

Or would that be horrendously inefficient?

Thanks all!