# When do I have to include things like Java's public static void main

Can someone tell me why sometimes people are including class C{public static void main(String[]a){...}} and sometimes that seems to be not necessary?(https://codegolf.stackexchange.com/a/62373/46569)

Whenever submissions are required to be full programs, Java's standard boilerplate code (i.e. class and main, etc.) is required. When submissions are allowed to be functions, this boilerplate is not required.