Should you design a method where it's params are static variables? In the example below, the calc method is pretty reusable, but it seems wierd to pass in static variables....
Setup
In class A, i have a static variable num and a static method genBalance. In my utility class B, i have a static method that does some calculations and uses the varialbe. Id does not modify it.
public class A{
public static Integer num;
static{
num = 0;
}
public static String genBalance(){
return 'You have a balance of : ' + B.calc(num);
}
}
public Class B{
public static Integer calc(integer a){
return a*10;
}
}