Using Static Methods and Variables. You can use static methods and variables only with outer classes. Inner classes have no static methods or variables. A static method or variable doesn’t require an instance of the class in order to run. … A static variable is static only within the scope of the Apex transaction.