+ 1
In Java what does void do?
I am confused on void in âpublic static voidâ I donât understand what it means and have yet to have it explained to me. I need help understanding what it is used for, if you can made it easy to understand that would be best.
3 Answers
+ 3
Satnam Singh I now understand public but static and void are still a bit confusing.
Static means that the method is associated with the class. So the method belongs to the class (ex class item) and not an object (ex: object ball)
But i still dont understand what void means. âhas no return valueâ doesnt make any sense to me.
(new to coding so my examples might be weird)