Getting rid of magic numbers in Java -


how rid of magic numbers in java without declaring massive amount of finals or static finals? keep in mind looping, arrays not allowed. doesn't seem possible? appreciated. thanks.

example code:

drawoval(5, 5, width, height); drawoval(10, 10, width, height); drawoval(15, 15, width, height); drawoval(20, 20, width, height); drawoval(25, 25, width, height); 

defining constants option. what's opposition using them? worth space in context. future developers rather see constants confused numbers mean.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -