A Basic Explanation of a "Hello World" program by a Java beginner. 04-03-2013, 08:11 AM
#1
So, I've been recently working on Java, just started today, but I remember the basics of a hello world program.
So, here's the code, but I'll try my best to explain what I know.
So, from what I know, I can tell you that a "class" is where a java program stores information, and you have to have a certain class.
And "System.out.println("Test");" is telling your program to send out a line from the system, ("Test") being the message. Keep in mind that the parenthesis nor the quotation marks show up. So if you want to have quotation marks in the line, it'll have to be (""Test""), which would make "Test", instead of just Test. And if you want parenthesis, it'd have to be ("("Test")") which would print out the whole ("Test").
That was my first post, just explaining how shit goes.
(The reason it says "That was my first post," was because I posted this on another forum. Ask MxRE.
)
^_^
So, here's the code, but I'll try my best to explain what I know.
Code:
public class testclass {
public static void main(String args[]){
System.out.println("Test");
}
}So, from what I know, I can tell you that a "class" is where a java program stores information, and you have to have a certain class.
And "System.out.println("Test");" is telling your program to send out a line from the system, ("Test") being the message. Keep in mind that the parenthesis nor the quotation marks show up. So if you want to have quotation marks in the line, it'll have to be (""Test""), which would make "Test", instead of just Test. And if you want parenthesis, it'd have to be ("("Test")") which would print out the whole ("Test").
That was my first post, just explaining how shit goes.
(The reason it says "That was my first post," was because I posted this on another forum. Ask MxRE.
)^_^

![[+]](https://sinister.li/images/modern/collapse_collapsed.png)


