Lessons

Introduction to Programming
2. Programming Languages

Code is written in a programming language, and just as there is not one language that is used by all the countries of the world, there is also not just one language in programming. There are hundreds of programming languages ​​and new ones are being defined all the time.

C++
#include <iostream>

int main() {
    std::cout << "Hello World!";
    return 0;
}

Java
import java.io.*;
 
class HelloWorldProgram {
    public static void main (String[] args) {
       System.out.println("Hello World");
    }
}
Here are examples of how to make the computer display the text "Hello World!" in the two different programming languages ​​C++ and Java

Each programming language defines a set of rules that must be followed in order for the computer to be able to read the code (a bit like grammar) - this is also called the syntax of the language. It could, for example, be that each instruction must end with a semicolon, or that words with a capital letter have a different function than words with a small letter … but this varies from language to language.

However, this does not mean that you have to learn 100 new languages ​​to become a programmer. Programming languages ​​often follow a specific paradigm or way of thinking, and therefore many of the languages ​​will be similar in their structure and syntax. Once you have mastered one programming language, it is therefore relatively easy to learn several different ones.