Java Playground - 2d canvas setup (avoid global vars): Online Interpreter, Compiler & Editor | Sololearn