Difference between revisions of "Hello World"
From mi-linux
Jump to navigationJump to search (New page: == Scala == <nowiki> </nowiki> == Java == <nowiki> public class Hello { public static void main(String[] args) { System.out.println("Hello World!"); } } </nowiki> == Py...) |
|||
Line 2: | Line 2: | ||
<nowiki> | <nowiki> | ||
− | + | object HelloWorld extends Application { | |
+ | println("Hello world!") | ||
+ | } | ||
</nowiki> | </nowiki> | ||
Line 17: | Line 19: | ||
</nowiki> | </nowiki> | ||
− | == | + | == c# == |
<nowiki> | <nowiki> | ||
− | + | using System; | |
+ | class ExampleClass | ||
+ | { | ||
+ | static void Main() | ||
+ | { | ||
+ | Console.WriteLine("Hello, world!"); | ||
+ | } | ||
+ | } | ||
</nowiki> | </nowiki> | ||
Line 29: | Line 38: | ||
echo("Hello World!"); | echo("Hello World!"); | ||
?> | ?> | ||
+ | </nowiki> | ||
+ | |||
+ | == Python (versions 1 and 2) == | ||
+ | |||
+ | <nowiki> | ||
+ | print "Hello World!" | ||
+ | </nowiki> | ||
+ | |||
+ | == Python3 == | ||
+ | |||
+ | <nowiki> | ||
+ | print("Hello World!") | ||
</nowiki> | </nowiki> |
Revision as of 17:03, 23 January 2011
Scala
object HelloWorld extends Application { println("Hello world!") }
Java
public class Hello { public static void main(String[] args) { System.out.println("Hello World!"); } }
c#
using System; class ExampleClass { static void Main() { Console.WriteLine("Hello, world!"); } }
PHP
<?php echo("Hello World!"); ?>
Python (versions 1 and 2)
print "Hello World!"
Python3
print("Hello World!")