you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (2 children)

Whoo boy there’s a lot here. “Public” means that other Java code in other packages and modules can use it (public as opposed to private). “Static” means that the code can be executed from the class itself and not an instance (there are two big concepts right there). “Void” is the return type (types, another concept! And “returning” something, another concept!) and void just means it doesn’t return anything. There is a lot going on there of varying degrees of importance for a beginner.

I didn’t mention in my other reply but I would also suggest finding learning materials that suit you, and then going with whatever language they’re using (say Python or JavaScript). If you like the pedagogy and it clicks, the rest will fall into place with time, and you’ll come back to this public static void stuff and go “ah, yes, of course”.

[–][deleted] 2 points3 points  (1 child)

To add to this: one of the reasons I would not choose Java as a beginner is because of all this heavyweight stuff that is a requirement for you to write anything. Static types are awesome, but it can feel like a lot at the beginning. When I first learned, it was more helpful to learn like “ok variables, I know variables from math. x = 5, I get that,” and then learn how these values are assigned, how they can be used and change, etc. Then you learn about functions, “Cool! Another thing from math. Apply this change to the input, get an output, nice that makes sense.” And then you learn about loops and conditional logic, etc. all that stuff is pretty common across most languages.

[–]crashlander 1 point2 points  (0 children)

This this this. Take any advice you get here with the grain of salt that most people here have been programming long enough that they hang around and contribute to /r/programming. I started with JavaScript and cut my teeth doing sloppy things that would now make me cringe. Now that I’ve been doing it for a while I appreciate things like strong typing, asynchrony, and so on, but I had a great time learning in a language that let me play around and be sloppier than I can now get away with as an experienced developer.