update
All checks were successful
Deploy / deploy (push) Successful in 11s

This commit is contained in:
2026-04-26 08:43:09 +03:00
parent 02ddfdf688
commit dabda497ec

View File

@@ -143,3 +143,49 @@ The advanced way of implementing the garbage collection is *traversing the graph
You can go and learn about it [here](https://google.github.io/styleguide/javaguide.html). You can go and learn about it [here](https://google.github.io/styleguide/javaguide.html).
# Hello World!
Let's create a file and name it `Helloworld.java`. I will annotate each code listing with a top comment with a filename for general understanding where the file is located and how it's called. And let's create a class.
```java
// Helloworld.java
public class Helloworld {
}
```
> [!NOTE]
> Notice, that the name of the class should be the same as the name of the file it which it is created.
Let's define a method called `main` inside this class
```java
// Helloworld.java
public class Helloworld {
public static void main(String[] args) {
}
}
```
This method will take an ***array of Strings*** called `args` as it's argument.
> [!NOTE]
> The name `args` is just a common name. You can call it whatever you want. For example `params`.
This method is being called at the start of our program.
Let's try to *print* `Hello, world` to the console.
```
// Helloworld.java
public class Helloworld {
public static void main(String[] args) {
System.out.println("Hello, world");
}
}
```