Suppose I have a series of methods across different classes that all use the same five core variables defined in my main method. I could chain these five variables as method arguments from one method to the next, or I could simply define these five variables as public class variables and reference their path each time I want to use them.What is considered more readable, and what is more efficient it terms of processing time? These values will not change throughout their lifespan in the program and take the form of Boolean values, multidimensional int[] arrays, and single dimensional int[] arrays.
Passing by value multiple times vs. Creating a public class variable
java;class design;methods