Skip to content

Commit

Permalink
(backend) lang: hello world
Browse files Browse the repository at this point in the history
  • Loading branch information
SensehacK committed Aug 8, 2024
1 parent 60cf12c commit f66f24d
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 1 deletion.
3 changes: 3 additions & 0 deletions backend/cPlusPlus/README_c_plus_plus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@


[pointer](pointer.md)
7 changes: 7 additions & 0 deletions backend/cPlusPlus/pointer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@


## Dangling pointer

A dangling pointer is a (non-NULL) pointer which points to unallocated (already freed) memory area.

[wiki](https://en.wikipedia.org/wiki/Dangling_pointer)
2 changes: 2 additions & 0 deletions backend/java/README_java.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

[install](backend/java/install.md)
38 changes: 38 additions & 0 deletions backend/java/hello_world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@


## Code

```java
class Test
{
public static void main(String []args)
{
System.out.println("My First Java Program.");
}
};
```


## Compile

To compile the program, we must run the Java compiler (javac), with the name of the source file on the “command prompt” like as follows

If everything is OK, the `javac` compiler creates a file called “Test.class” containing the byte code of the program.

```sh
javac HelloWorld.java
```

## Execute

- Create the program by typing it into a text editor and saving it to a file – HelloWorld.java.
- Compile it by typing “javac HelloWorld.java” in the terminal window.
- Execute (or run) it by typing “java HelloWorld” in the terminal window.

```sh
java HelloWorld
```

## Resource

[GfG | hello world ex](https://www.geeksforgeeks.org/java-hello-world-program/)
Empty file added backend/java/install.md
Empty file.
2 changes: 1 addition & 1 deletion backend/ruby/README_ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[documentation](backend/ruby/documentation.md)

[[hello_world]]
[[backend/ruby/hello_world]]

[[backend/ruby/ternary]]

0 comments on commit f66f24d

Please sign in to comment.