Can I use the final access modifier with public static void main(String args[]){ } method in Java? -
class test{ public static final void main(string args[]){ } }
what other access modifiers can use main() in java 1.8?
yes can, final
not make sense when used static method, since static methods cannot overridden anyway.
by way, final , static not access modifiers. access modifiers control entity allowed access method/field.
Comments
Post a Comment