Skip to content

Talk is cheap. Show me the code

好记性不如烂笔头,废话少说,放码过来!

Java (饭碗)

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

HTML (网页结构)

html
<!DOCTYPE html>
<html>
<body>
    <h1>Hello, World!</h1>
</body>
</html>

Python (最简洁)

python
print("Hello, World!")

JavaScript (前端必备)

javascript
console.log("Hello, World!");

C (底层之祖)

c
#include <stdio.h>

int main() {
    printf("Hello, World!\n");
    return 0;
}

C++ (高性能代表)

cpp
#include <iostream>

int main() {
    std::cout << "Hello, World!" << std::endl;
    return 0;
}

Rust (现代安全之选)

rust
fn main() {
    println!("Hello, World!");
}

Swift (苹果开发)

swift
print("Hello, World!")

Go (云原生宠儿)

go
package main
import "fmt"

func main() {
    fmt.Println("Hello, World!")
}

Bash (脚本自动化)

bash
echo "Hello, World!"

Logo hello world