how to access a variable the static way in java code example Example: run static method java Class.staticMethod();