C#:
// A Hello World! program in C#. using System; namespace HelloWorld { class Hello { static void Main() { Console.WriteLine("Hello World!"); // Keep the console window open in debug mode. Console.WriteLine("Press any key to exit."); Console.ReadKey(); } } }
Java:
public class HelloWorld { public static void main (String[] args) { // Prints "Hello, World" to the terminal window. System.out.println("Hello, World"); } } Cobol:
IDENTIFICATION DIVISION. PROGRAM-ID. HELLO-WORLD. * simple hello world program PROCEDURE DIVISION. DISPLAY 'Hello world!'. STOP RUN.
Delphi:
program HelloWorld; | |
{$APPTYPE CONSOLE} | |
begin | |
WriteLn('Hello World'); | |
end. |