"Hello, World!" in 20 Popular Programming Languages
Tags: programming, webdev, tutorial
Published: 2021-11-11 13:09:49

When I start learning any programming language, the first example I get from the tutorial is : let's print "Hello World!".
This exercise in every tutorial is considered to be one of the simplest programs possible in almost all languages.

In this article, you'll learn how to write the "Hello, World!" program in the top 20 most popular programming languages.

## 01. "Hello World" Program in JavaScript
Of course I would start from a language which I know already.

```html
<script>
  console.log('Hello, World!');
</script>
```


## 02. "Hello World" Program in Python
Python is also one of the most popular programming languages. It's used for software development, system scripting, web development

```python
print("Hello, World!")
```


## 03. "Hello World" Program in Java
Java is a high-level, class-based, and object-oriented programming language.

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


## 04. "Hello World" Program in Kotlin
Kotlin is primarily used for android development.

```kotlin
fun main(args: Array<String>) {
 println("Hello, World!")
}
```

## 05. "Hello World" Program in PHP
PHP is an a scripting language, It's used to develop websites and web apps.

```php
<!DOCTYPE html>
  <html>
    <head>
      <title> </title>
    </head>
    <body>
 
      <?php
       echo "Hello, World!";
      ?>
 
    </body>
  </html>
```

## 06. "Hello World" Program in "C#"
C# is used to develop desktop applications, web applications, and web services. It's also used in game development.

```C#
namespace HelloWorld
{
 class Hello { 
    static void Main(string[] args) 
    {
       System.Console.WriteLine("Hello, World!");
    }
 }
}
```


## 07. "Hello World" Program in Swift
Swift was created by Apple in 2014. It's a general-purpose programming language for the Apple ecosystem.

```java
print("Hello, World!")
```

## 08. "Hello World" Program in C++
C++ is a general-purpose object-oriented programming language created by Bjarne Stroustrup. It's widely used to develop operating systems, browsers, games, etc.

```c++
#include <iostream>
using namespace std;
int main()
{
 cout << "Hello, World!";
 return 0;
}
```

## 09. "Hello World" Program in C
C is used to develop software like operating systems, databases, compilers, etc.

```c
#include <stdio.h>
 
int main()
{
 printf("Hello, World!");
 return 0;
}
```

## 10. "Hello World" Program in Matlab
MATLAB is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks.

```matlab
disp('Hello, World!');
```

## 11. "Hello World" Program in R
R is a programming language and free software environment for statistical computing and graphics supported by the R Core Team and the R Foundation for Statistical Computing.

```R
cat('Hello, World!')
```

## 12. "Hello World" Program in Rub
Ruby is an interpreted, high-level, general-purpose programming language.

```R
cat('Hello, World!')
```

## 13. "Hello World" Program in Rust
Rust is an open-source systems programming language that focuses on speed, memory safety and parallelism. Developers are using Rust to create a wide range of new software applications, such as game engines, operating systems, file systems, browser components and simulation engines for virtual reality.

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

## 14. "Hello World" Program in TypeScript
TypeScript is a programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript and adds optional static typing to the language.

```typescript
let message: string = 'Hello, World!';
console.log(message);
```

## 15. "Hello World" Program in Perl
Perl is a general-purpose coding language used for text manipulation, system administration, web development, network programming, GUI development, etc.

```perl
#!/usr/bin/perl
use strict;
use warnings;
print("Hello, World!");
```

## 16. "Hello World" Program in Scala 
Scala is a high-level language that combines the features of object-oriented and functional programming in one language.

```scala
object Hello {
 def main(args: Array[String]) = {
 println("Hello, World!")
 }
}
```

## 17. "Hello World" Program in Dart
Dart is a general-purpose, object-oriented, class-based, garbage-collected language with C-style syntax. It was created by Google in 2011

```dart
void main() {
 print('Hello, World!');
}
```

## 18. "Hello World" Program in Solidity
Solidity is an object-oriented programming language for writing smart contracts. It is used for implementing smart contracts on various blockchain platforms, most notably, Ethereum.

```solidity
pragma solidity ^0.4.22;
contract helloWorld {
 function renderHelloWorld () public pure returns (string) {
 return 'Hello, World!';
 }
}
```


## 19. "Hello World" Program in Go
Go is a statically typed, compiled programming language designed at Google by Robert Griesemer, Rob Pike, and Ken Thompson.

```go
package main
import "fmt"
 
func main() {
 fmt.Println("Hello, World!")
}
```

## 20. "Hello World" Program in Julia
Julia is a high-performance, high-level, open-source, dynamically-typed programming language. Julia was created by combining the powerful features of other programming languages like C, Ruby, Lisp, Matlab, Python, R, and Perl.

```java
println("Hello, World!")
```