0

Comment différencier une méthode de la classe d' une méthode de l objet ?

15th Aug 2020, 1:00 AM
لطيفة ميمون بن باري
لطيفة ميمون بن باري - avatar
2 odpowiedzi
+ 1
Class methods will be prefixed with a 'static' keyword. This makes sure that there is only one copy of the method. public static void display(){ } Object methods do not belong to the class but to the instance of the class and you can create as many copies you want. public void display(){ }
15th Aug 2020, 7:49 AM
Avinesh
Avinesh - avatar
0
Tanks
15th Aug 2020, 11:46 AM
لطيفة ميمون بن باري
لطيفة ميمون بن باري - avatar