+ 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 Respuestas
+ 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)