Because main function is a static function, to call another non-static variable/function, you need to create an object in the main function. The contents of the main function are not static/non-static themselves but the main function is. Also, no object is static/non-static in JAVA.