各种HelloWorld

1、java

public class MyFirstJavaProgram {
   /* 第一个Java程序.  
    * 它将打印字符串 Hello World
    */
    public static void main(String []args) {
       System.out.println("Hello World"); // 打印 Hello World
    }
} 

2、php

<?php

echo 'hello world';

?>

3、python

# Hello World program in Python

print "Hello World!"

4、html

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Demo</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>

5、c

#include <stdio.h>

int main()
{
   /* 我的第一个 C 程序 */
   printf("Hello, World! ");

   return 0;
}

6、jsp

<html>
<head>
<title>Hello World</title>
</head>
<body>
<%-- This is a JSP Comment before JSP Scriplet --%>
<%
    //Prints out to console
    System.out.println("Hello World in Console!");

    //Prints out to HTML page
    out.println("<h1>Hello World!</h1>");
%>
</body>
</html>

7、javascript

function displayDate(){
    document.getElementById("demo").innerHTML="Hello World";
}
2016-10-25 14:1850