码迷,mamicode.com
首页 > 其他好文 > 详细

Hello world

时间:2015-04-05 23:25:29      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:

Java

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, world!");
    }
}

JavaScript

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!‘);
 

C#

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!");
    }
}

 

HTML

<!DOCTYPE html>
<html>
   <head></head>
   <body>
       <p>Hello, world!</p>
   </body>
</html>

 

SQL

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.

 

PL/SQL

SET SERVEROUTPUT ON;
BEGIN
    DBMS_OUTPUT.PUT_LINE(Hello, world!);
END;

Visual Basic .NET

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

 

Hello world

标签:

原文地址:http://www.cnblogs.com/sealovesky99/p/4394980.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!