HelloWorld

你好,我是猫的于,我精通各种语言的HelloWorld, 你不信?

Java

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

Python

1
print("Hello, World!")

JavaScript

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

C

1
2
3
4
5
6
#include <stdio.h>

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

C++

1
2
3
4
5
6
#include <iostream>

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

C#

1
2
3
4
5
6
7
using System;

class Program {
static void Main() {
Console.WriteLine("Hello, World!");
}
}

Ruby

1
puts "Hello, World!"

PHP

1
2
3
<?php
echo "Hello, World!";
?>

Swift

1
print("Hello, World!")

Go

1
2
3
4
5
6
7
package main

import "fmt"

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

Kotlin

1
2
3
fun main() {
println("Hello, World!")
}