OOP Java class examples for static fields and methods