+ 1

What is the difference between "public void" and "public static void" ? And can i have the explanation of what every word mean?

Explanation plz (look at title)

2nd Apr 2020, 9:00 PM
Yahel
Yahel - avatar
5 Réponses
3rd Apr 2020, 5:32 AM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
+ 5
public keyoword is a access modifer mens that you can access veriable, method, class outside of package void keyword mens nothing you dont want any return value from your method. static keyowrd is for accesing method, veriable without using object
2nd Apr 2020, 9:56 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
+ 2
Welcome Happy coding
3rd Apr 2020, 7:23 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
3rd Apr 2020, 7:13 PM
Yahel
Yahel - avatar
0
Sumit Programmer😎😎 do you have an example please?
2nd Apr 2020, 10:06 PM
Yahel
Yahel - avatar