This content originally appeared on DEV Community 👩💻👨💻 and was authored by Rakesh KR
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")
This content originally appeared on DEV Community 👩💻👨💻 and was authored by Rakesh KR
Rakesh KR | Sciencx (2022-12-05T14:44:40+00:00) “Hello World” in 10 Languages. Retrieved from https://www.scien.cx/2022/12/05/hello-world-in-10-languages/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.