Here is how you can say ‘Hello World’ in 26 different coding languages

Say ‘Hello World’ in 26 Different Programming Languages

Programming always fascinates people. Programming forms the core of all computers and “Hello World” is theย first phrase that we try out when trying a new coding language. Writing theย code for “Hello, world!” program outputs “Hello, World!” on a display device.

Hello World is normally tried because it is one of the simplest programs possible in almost all computer languages. As such it can be used to quickly compare syntax differences between various programming languages.ย It is also used to verify that a language or system is operating correctly. The following is a list of “Hello, world” programs in 26 of the most commonly usedย programming languages.

1. Bash

echo "Hello World"

2. Basic

PRINT "Hello, world!"?

3. C

#include 
ย 
int main(void)
{
ย  ย  puts("Hello, world!");
}

4. C++

#include 
ย 
int main()
{
ย  ย  std::cout << "Hello, world!
";
ย  ย  return 0;
}

5. C#

using System;
class Program
{
ย  ย  public static void Main(string[] args)
ย  ย  {
ย  ย  ย  ย  Console.WriteLine("Hello, world!");
ย  ย  }
}

6. Clipper

? "Hello World"

7. CoffeeScript

console.log 'Hello, world!'

8. Delphi

program HelloWorld;
begin
ย  Writeln('Hello, world!');
end.

9. HTML

Hello World!

10. Java

import javax.swing.JFrame; ย //Importing class JFrame
import javax.swing.JLabel; ย //Importing class JLabel
public class HelloWorld {
ย ย  ย public static void main(String[] args) {
ย ย  ย ย ย  ย JFrame frame = new JFrame(); ย  ย  ย  ย  ย  //Creating frame
ย ย  ย ย ย  ย frame.setTitle("Hi!"); ย  ย  ย  ย  ย  ย  ย  ย  //Setting title frame
ย ย  ย ย ย  ย frame.add(new JLabel("Hello, world!"));//Adding text to frame
ย ย  ย ย ย  ย frame.pack(); ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย //Setting size to smallest
ย ย  ย ย ย  ย frame.setLocationRelativeTo(null); ย  ย  //Centering frame
ย ย  ย ย ย  ย frame.setVisible(true); ย  ย  ย  ย  ย  ย  ย  ย //Showing frame
ย ย  ย }
}

11. JavaScript

document.write('Hello, world!');

12. jQuery

$("body").append("Hello world!");

13. Julia

println("Hello world!")

print [Hello, world!]

15. MatLab

disp('Hello, world!')

16. Objective-C

#import 
#import ย 
int main(void)
{
ย  ย  NSLog(@"Hello, world!
");
ย  ย  return 0;
}

17. Pascal

program HelloWorld;
begin
ย  WriteLn('Hello, world!');
end.

18. Perl 5

print "Hello, world!
";

19. Processing

void setup(){
ย  println("Hello, world!");
}

20. Python

print "Hello, world!"

21. R

cat('Hello, world!
')

22. Ruby

puts "Hello, world!"

23. Swift

println("Hello, world!")

24. VBScript

MsgBox "Hello, World!"

25. Visual Basic .NET

Module Module1
ย  ย  Sub Main()
ย  ย  ย  ย  Console.WriteLine("Hello, world!")
ย  ย  End Sub
End Module

26. XSLT

ย  ย  ย  Hello World
spot_img

Read More

Suggested Post