Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What will happen if you change the sequence of keywords(public/static/void) in main method?

user-image
Question ajoutée par himanshu mittal
Date de publication: 2013/06/25
gagandeep kaur gagan
par gagandeep kaur gagan , internship , hcl-cdc

if we change sequence public and static there is no effect on excution bu if we write public void static then exceprion can be occur

Daanish Rumani
par Daanish Rumani , Product Manager , Publicis Sapient

You cannot do that for any method.
It shall result in a compile error.
I mean you cannot expect the following code to compile void public static myMethod() { }

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?