Start static variable as true on first mute method to false
I would like the second method to inherit the value of the first and not the global value
calling the public method I want the boolean to receive the value of the private method
public class Test{
private static Boolean varBool= true;
private static void fistMethod(){
varBool= true;
}
public static void secondMethod(){
varBool;
//This variable return true value
}
}
true
twice. I'm not sure what behavior you are looking for other than getting backtrue
. Could you clarify by an edit, please? N.b. Apex does not have true global variables; this is a static variable.