zoukankan      html  css  js  c++  java
  • Hello world

    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

     
  • 相关阅读:
    java常见面试题汇总(一)
    我的自学之路:java学习路线图分享
    bzoj3714 [PA2014]Kuglarz
    cf478D Red-Green Towers
    cf478C Table Decorations
    cf478B Random Teams
    cf479A Expression
    cf479C Exams
    cf479D Long Jumps
    cf479E Riding in a Lift
  • 原文地址:https://www.cnblogs.com/sealovesky99/p/4394980.html
Copyright © 2011-2022 走看看