r/learnjava • u/sparkless12 • May 24 '21
Java Environment and "how it works"
As everyone learning Java I started my first lesson with "you don't care about that weird public static void main(String[] args) bit, we explain later" months after, tutorials, and people never explained whats going on within that method, and going deeper how java actually works.
I banged into this problem and lack of explanation when I was trying to make VSC work as Java Dev Environment. I have so many questions...like what is actually java_home how does that work. How does Maven project differs from basic projects I was making in Netbeans, how is JavaFX part of Java packages but when running project it never compiles correctly.
I'm sure these are very naive questions with layers and layers of knowledge that I should have but never got to learn. Is there a good tutorial series or video playlist (pls dont link basic Java docs) that I could learn these things from?
7
u/shaybra May 24 '21
It's the main method that's public, static so it can be accessed without making an object of the class via ClassName.methodName, void meaning it returns nothing, main is just the methods name, and String[] args means the main method takes in a string of arguments when called on like when you put in flags when calling on an exe. Hope that helps.