Sinisterly
Explanation of a "Hello World" program in Java. - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Coding (https://sinister.li/Forum-Coding--71)
+--- Thread: Explanation of a "Hello World" program in Java. (/Thread-Explanation-of-a-Hello-World-program-in-Java)

Pages: 1 2


Explanation of a "Hello World" program in Java. - The Doctor - 04-03-2013

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.
^_^


RE: Your start to Java! - Banadmin - 04-03-2013

Nice quick and easy tutorial mate, thanks for sharing!


RE: Your start to Java! - Harvey - 04-03-2013

Can you believe you can do all that in 1 line of code in Python?

Code:
print 'Test'

Biggrin


RE: Your start to Java! - The Doctor - 04-03-2013

(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


RE: Your start to Java! - Harvey - 04-03-2013

(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


RE: Your start to Java! - The Doctor - 04-03-2013

(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


RE: Your start to Java! - Harvey - 04-03-2013

(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


RE: Your start to Java! - The Doctor - 04-03-2013

(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


RE: Your start to Java! - Banadmin - 04-03-2013

(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.


RE: Your start to Java! - Harvey - 04-03-2013

(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