Hello World! in 5 Different Programming languages

Greetings!! from this blog post, I am starting a new series called the “Basics of Code 5 Different Languages” in this series as the title says we are going to study all the beginner concepts that are necessary to start with code ex. variables, function…


This content originally appeared on DEV Community and was authored by Nibodh Daware

Greetings!! from this blog post, I am starting a new series called the "Basics of Code 5 Different Languages" in this series as the title says we are going to study all the beginner concepts that are necessary to start with code ex. variables, functions, loops, conditionals in 5 different programming languages namely: Python ?, Java ☕️, C/C++ (Both are basically the same), C# and Javascript (yes, Java and Javascript are different)

In this post, we will be learning the cliché "printing the Hello World to the console" in the above-mentioned programming languages

Python ?

Python, O Python Near and Dear to my Heart ❤️ - Nibodh Daware

Python was actually the first programming language that introduced me to this amazing world of programming
Python among all is the most understandable and easy syntax
Create a hello.py file and put the below code in it.

print("Hello World!")

That's it no semicolons no weird things like importing a print statement from classes inside of classes just plain simple print Hello World. This is the simplicity that python really is famous for.

Now let's move on to the weird parts,

Java ☕️

BEAN LANGUAGE IS NEXT...???

I haven't programmed in Java for a while last time I did I remember I was trying to make Minecraft mods but never got into my head
I have heard a lot of praise from people who choose Java as their first language that it has basically changed their lives so I don't know.
Create a hello.java file and put the below code in it.

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

Even though it has a long syntax but I love the fact that it was made with Object-Oriented Programming concepts in mind, and I think it is so good for so many people like the fact that it has so many better features as compared to the previous generation la#nguages like C++.

C#\

Took me a long time to learn how to escape the # in markdown.

As you may have guessed I have tried C#\ too as I am way too predictable it was in theory my first language as nearly everybody wanted to get into programming because of games and what better way to make games than Unity and C#
Create a hello.cs file and put the below code in it.

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

Looks really similar to Java in my opinion.

C/C++

Origin of all!!!!

I can't much about it except I have to learn it in college and I don't think it will stop haunting my back anytime soon. I'm kidding I like C.

This is Hello World in C:
Create a hello.c file and put the below code in it.

#include <stdio.h>

void main(){
      printf("Hello World");
}

and this in C++
Create a hello.cpp file and put the below code in it.

#include <iostream>
using namespace std;

int main(){
    cout << "Hello World" << endl;
    return 0;
}

There are also other ways but this is how I like to write it.

Javascript ☕️?

Best for beginners

This is also one of my favourite languages out of all the languages I touched the past year. If I start I am not going to stop talking so let's write the Hello World
Create a hello.js file and put the below code in it.

console.log("Hello World");

By now you may know I like simple and easy languages. Here the console doesn't mean by the native command line but the browser inspect window.

image.png

Conclusion

Choosing your first language is really important as it will predict your experience in this journey.

All the languages that I have introduced you in this post you can't go wrong with them. I may recommend you to find out more about what these languages can do and then choose one of them.


This content originally appeared on DEV Community and was authored by Nibodh Daware


Print Share Comment Cite Upload Translate Updates
APA

Nibodh Daware | Sciencx (2021-09-16T06:46:32+00:00) Hello World! in 5 Different Programming languages. Retrieved from https://www.scien.cx/2021/09/16/hello-world-in-5-different-programming-languages/

MLA
" » Hello World! in 5 Different Programming languages." Nibodh Daware | Sciencx - Thursday September 16, 2021, https://www.scien.cx/2021/09/16/hello-world-in-5-different-programming-languages/
HARVARD
Nibodh Daware | Sciencx Thursday September 16, 2021 » Hello World! in 5 Different Programming languages., viewed ,<https://www.scien.cx/2021/09/16/hello-world-in-5-different-programming-languages/>
VANCOUVER
Nibodh Daware | Sciencx - » Hello World! in 5 Different Programming languages. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/09/16/hello-world-in-5-different-programming-languages/
CHICAGO
" » Hello World! in 5 Different Programming languages." Nibodh Daware | Sciencx - Accessed . https://www.scien.cx/2021/09/16/hello-world-in-5-different-programming-languages/
IEEE
" » Hello World! in 5 Different Programming languages." Nibodh Daware | Sciencx [Online]. Available: https://www.scien.cx/2021/09/16/hello-world-in-5-different-programming-languages/. [Accessed: ]
rf:citation
» Hello World! in 5 Different Programming languages | Nibodh Daware | Sciencx | https://www.scien.cx/2021/09/16/hello-world-in-5-different-programming-languages/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.