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

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -