Java Fundamentals: what is a programming language
Introductory explanation of programming languages, Java, bytecode, the JVM, and common areas where the language is used.
A programming language lets you write instructions that the computer can execute after being interpreted or compiled.
What a programming language is
A programming language is a form of communication between the programmer and the computer.
It lets you write instructions for a machine to perform specific tasks.
With a programming language, it is possible to create different kinds of software, such as:
- websites;
- apps;
- desktop systems;
- games;
- APIs;
- banking systems;
- enterprise systems.
Just as we use languages to communicate with people, we use programming languages to describe to the computer what should be done.
Language examples
There are many programming languages, each with its own characteristics, rules, and most common uses.
Some examples are:
- Java;
- Python;
- JavaScript;
- C;
- C++;
- C#;
- Go;
- PHP.
Each language has its own syntax and is usually chosen according to the type of problem, the environment, the team, and the project requirements.
What Java is
Java is a high-level, object-oriented, multiplatform programming language, widely used in systems development.
It became known for the proposition that a program could be written once and run in different environments.
This idea is strongly associated with the phrase:
Write once, run anywhere.
In practice, this phrase depends on one important condition: the environment needs a compatible JVM.
How Java runs programs
Java code is not executed directly by the operating system like regular native code.
First, the Java source code is compiled.
After compilation, .class files are generated, which contain bytecodes.
These bytecodes are executed by the JVM, short for Java Virtual Machine.
The basic flow is:
Código Java
↓
Compilação
↓
Bytecode
↓
JVM
↓
Execução do programa
Where Java is used
Java is widely used in areas such as:
- enterprise systems;
- web applications;
- APIs;
- Android apps;
- banking systems;
- large-scale systems;
- microservices.
This presence in large systems exists because Java has a mature ecosystem, good organization for object-oriented projects, and strong use in professional environments.
Java and object orientation
Java is strongly based on Object-Oriented Programming concepts, such as:
- classes;
- objects;
- abstraction;
- encapsulation;
- inheritance;
- polymorphism.
That is why Java is a language widely used to study and apply the fundamentals of object orientation.
Summary
A programming language is a way of writing instructions for the computer.
Java is one of these languages and stands out for its relationship with object orientation, portability, and execution through the JVM.
To understand Java well, it is important to grasp the role of source code, compilation, bytecode, and the Java Virtual Machine.