I have a console based Java application. In it, I print a rectangular array of characters. Something like the following.
.....
.....
.....
.....
.....
Essentially, a 5x5
grid.
The trouble is, I want to fill exactly the width and height of the console window that is running my application. How do I determine the necessary dimensions dynamically?