标签:
public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, world!"); } }
To write to a console or debugging log:
console.log(‘Hello, world!‘);
To display an alert dialog box:
alert(‘Hello, world!‘);
To write to an HTML document:
document.write(‘Hello, world!‘);
In a console or terminal:
using System; class Program { public static void Main(string[] args) { Console.WriteLine("Hello, world!"); } }
Via a GUI message box:
using System.Windows.Forms; class Program { public static void Main(string[] args) { MessageBox.Show("Hello, world!"); } }
<!DOCTYPE html> <html> <head></head> <body> <p>Hello, world!</p> </body> </html>
SELECT ‘Hello, world!‘ FROM DUMMY; -- DUMMY is a standard table in SAP HANA. SELECT ‘Hello, world!‘ FROM DUAL; -- DUAL is a standard table in Oracle. SELECT ‘Hello, world!‘; -- Works for SQL Server, Microsoft Access, PostgreSQL, SQLite, and MySQL.
SET SERVEROUTPUT ON; BEGIN DBMS_OUTPUT.PUT_LINE(‘Hello, world!‘); END;
In a console or terminal window:
Module Module1 Sub Main() Console.WriteLine("Hello, world!") End Sub End Module
In a message box:
Module Module1 Sub Main() MsgBox("Hello, world!") End Sub End Module
examples Reference Url:http://en.wikipedia.org/wiki/List_of_Hello_world_program_examples
标签:
原文地址:http://www.cnblogs.com/sealovesky99/p/4394980.html