"Hello World" in 10 Languages
Rakesh KR
Posted on December 5, 2022
Hello World 👋🌍
Let's go through the "Hello World" syntax in 10 languages 🐱💻.
Feel free to comment ✍️ your first 🥇 "Hello World" language.
1. Java
class Main {
public static void main(String[] args){
System.out.println("Hello World");
}
}
2. C
#include<stdio.h>
int main(){
printf("Hello World");
return 0;
}
3. C++
#include<iostream>
int main (){
std::cout << "Hello World";
return 0;
}
4. C#
public class Hello{
public static void Main(String[] args){
System.Console.WriteLine("Hello World");
}
}
5. Python
print("Hello World")
6. JS
console.log("Hello World");
alert("Hello World");
document.write("Hello World");
7. GO
package main
import "fmt"
func main(){
fmt.Println("Hello World")
}
8. Kotlin
func main(){
println("Hello World")
}
9. PHP
<?php
echo "Hello World";
?>
10. Swift
import Swift
print("Hello World")
💖 💪 🙅 🚩
Rakesh KR
Posted on December 5, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.