Login Register






Explanation of a "Hello World" program in Java. filter_list
Author
Message
Explanation of a "Hello World" program in Java. #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.

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, but only "Test" shows up.

That was my first post, just explaining how shit goes.
^_^

Reply

RE: Your start to Java! #2
Nice quick and easy tutorial mate, thanks for sharing!

Reply

RE: Your start to Java! #3
Can you believe you can do all that in 1 line of code in Python?

Code:
print 'Test'

Biggrin

Reply

RE: Your start to Java! #4
(04-03-2013, 07:51 AM).py Wrote: Can you believe you can do all that in 1 line of code in Python?

Code:
print 'Test'

Biggrin

Yeah, that's pretty much the same way in C#. Tongue

(04-03-2013, 07:50 AM)MxRE Wrote: Nice quick and easy tutorial mate, thanks for sharing!

Thanks! Smile

Reply

RE: Your start to Java! #5
(04-03-2013, 07:51 AM)Ulquiorra Wrote:
(04-03-2013, 07:51 AM).py Wrote: Can you believe you can do all that in 1 line of code in Python?

Code:
print 'Test'

Biggrin

Yeah, that's pretty much the same way in C#. Tongue

(04-03-2013, 07:50 AM)MxRE Wrote: Nice quick and easy tutorial mate, thanks for sharing!

Thanks! Smile

A Hello World app in C# looks like this.

Code:
public class Hello1 { public static void Main() { System.Console.WriteLine("Hello, World!"); } }

Considerably longer. :p

Reply

RE: Your start to Java! #6
(04-03-2013, 07:58 AM).py Wrote:
(04-03-2013, 07:51 AM)Ulquiorra Wrote:
(04-03-2013, 07:51 AM).py Wrote: Can you believe you can do all that in 1 line of code in Python?

Code:
print 'Test'

Biggrin

Yeah, that's pretty much the same way in C#. Tongue

(04-03-2013, 07:50 AM)MxRE Wrote: Nice quick and easy tutorial mate, thanks for sharing!

Thanks! Smile

A Hello World app in C# looks like this.

Code:
public class Hello1 { public static void Main() { System.Console.WriteLine("Hello, World!"); } }

Considerably longer. :p

I can't remember which language, but it was like print "text" or something, it wasn't Python, but it could have been. Meh. Tongue

Reply

RE: Your start to Java! #7
(04-03-2013, 08:00 AM)Ulquiorra Wrote:
(04-03-2013, 07:58 AM).py Wrote:
(04-03-2013, 07:51 AM)Ulquiorra Wrote:
(04-03-2013, 07:51 AM).py Wrote: Can you believe you can do all that in 1 line of code in Python?

Code:
print 'Test'

Biggrin

Yeah, that's pretty much the same way in C#. Tongue

(04-03-2013, 07:50 AM)MxRE Wrote: Nice quick and easy tutorial mate, thanks for sharing!

Thanks! Smile

A Hello World app in C# looks like this.

Code:
public class Hello1 { public static void Main() { System.Console.WriteLine("Hello, World!"); } }

Considerably longer. :p

I can't remember which language, but it was like print "text" or something, it wasn't Python, but it could have been. Meh. Tongue

Probably was. But yeah, Java is an absolutely brilliant language to learn. I hope you stick to it. Smile

Reply

RE: Your start to Java! #8
(04-03-2013, 08:05 AM).py Wrote:
(04-03-2013, 08:00 AM)Ulquiorra Wrote:
(04-03-2013, 07:58 AM).py Wrote:
(04-03-2013, 07:51 AM)Ulquiorra Wrote:
(04-03-2013, 07:51 AM).py Wrote: Can you believe you can do all that in 1 line of code in Python?

Code:
print 'Test'

Biggrin

Yeah, that's pretty much the same way in C#. Tongue

(04-03-2013, 07:50 AM)MxRE Wrote: Nice quick and easy tutorial mate, thanks for sharing!

Thanks! Smile

A Hello World app in C# looks like this.

Code:
public class Hello1 { public static void Main() { System.Console.WriteLine("Hello, World!"); } }

Considerably longer. :p

I can't remember which language, but it was like print "text" or something, it wasn't Python, but it could have been. Meh. Tongue

Probably was. But yeah, Java is an absolutely brilliant language to learn. I hope you stick to it. Smile
I'll try, I'm currently on a programming team developing an app. It's android, and since I'm new, they gave me the tutorials to learn. ^_^

It's being endorsed by a MC server and a YouTuber who has over 400k subs to advertise it, so it could be a $1.5 million dollar app, and guess how good THAT would look on my resume, eh? Tongue

Reply

RE: Your start to Java! #9
(04-03-2013, 08:09 AM)Ulquiorra Wrote:
(04-03-2013, 08:05 AM).py Wrote:
(04-03-2013, 08:00 AM)Ulquiorra Wrote:
(04-03-2013, 07:58 AM).py Wrote:
(04-03-2013, 07:51 AM)Ulquiorra Wrote: Yeah, that's pretty much the same way in C#. Tongue


Thanks! Smile

A Hello World app in C# looks like this.

Code:
public class Hello1 { public static void Main() { System.Console.WriteLine("Hello, World!"); } }

Considerably longer. :p

I can't remember which language, but it was like print "text" or something, it wasn't Python, but it could have been. Meh. Tongue

Probably was. But yeah, Java is an absolutely brilliant language to learn. I hope you stick to it. Smile
I'll try, I'm currently on a programming team developing an app. It's android, and since I'm new, they gave me the tutorials to learn. ^_^

It's being endorsed by a MC server and a YouTuber who has over 400k subs to advertise it, so it could be a $1.5 million dollar app, and guess how good THAT would look on my resume, eh? Tongue

That sounds really promising man. Good luck with it, hope it turns out well.

Reply

RE: Your start to Java! #10
(04-03-2013, 08:09 AM)Ulquiorra Wrote:
(04-03-2013, 08:05 AM).py Wrote:
(04-03-2013, 08:00 AM)Ulquiorra Wrote:
(04-03-2013, 07:58 AM).py Wrote:
(04-03-2013, 07:51 AM)Ulquiorra Wrote: Yeah, that's pretty much the same way in C#. Tongue


Thanks! Smile

A Hello World app in C# looks like this.

Code:
public class Hello1 { public static void Main() { System.Console.WriteLine("Hello, World!"); } }

Considerably longer. :p

I can't remember which language, but it was like print "text" or something, it wasn't Python, but it could have been. Meh. Tongue

Probably was. But yeah, Java is an absolutely brilliant language to learn. I hope you stick to it. Smile
I'll try, I'm currently on a programming team developing an app. It's android, and since I'm new, they gave me the tutorials to learn. ^_^

It's being endorsed by a MC server and a YouTuber who has over 400k subs to advertise it, so it could be a $1.5 million dollar app, and guess how good THAT would look on my resume, eh? Tongue

Myself and my business partner are too working on an app. Perhaps we can share ideas some day. Smile

Reply