vendredi 31 janvier 2020

I can't understand the syntax of this code

I am watching a course about design-patterns and it uses sample codes like below, but I can't understand the language of the code exactly. For example in the following code I can't understand how public static ExampleSingleton getInstances() works? I mean why does it use the name of the class before the name of the function?

enter image description here

Or in the next code, why in publick Kinfe orderKinfe(String knifeType) it uses Kinfe word before the name of the method?

enter image description here

I have confused about this syntax and can't understand it right. So please help me!

Aucun commentaire:

Enregistrer un commentaire