I can declare a `2D array` of size `10^9*10^9` but when for a given test case which requires this size throws an exception of Exception in thread "main" java.lang.OutOfMemoryError: Java heap space and yes if it leads to complete memory usage then why are able to instantiate such arrays?