Skip to content

Instantly share code, notes, and snippets.

@morganwilde
Created April 19, 2015 21:07
Show Gist options
  • Save morganwilde/036b0934f74fbe5666cd to your computer and use it in GitHub Desktop.
Save morganwilde/036b0934f74fbe5666cd to your computer and use it in GitHub Desktop.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment