I am trying to access variable outside an if statement in java. The variable is axeMinDmg. Here is what i have but getting an error. I want minDmg = axeMi
In Java, variables are defined within a scope. Here the scope is the if block. so if you declare it outside the if block, it will be available in the enclosing method scope.