LETS START A RIOT OOO A RIOT

This commit is contained in:
Sage The DM 2024-11-27 15:00:54 +01:00
parent 72f7a2e529
commit a491769914
22 changed files with 234 additions and 0 deletions

View file

@ -0,0 +1,7 @@
{
"java.project.sourcePaths": ["src"],
"java.project.outputPath": "bin",
"java.project.referencedLibraries": [
"lib/**/*.jar"
]
}

View file

@ -0,0 +1,18 @@
## Getting Started
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
## Folder Structure
The workspace contains two folders by default, where:
- `src`: the folder to maintain sources
- `lib`: the folder to maintain dependencies
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
## Dependency Management
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,18 @@
public class App {
public static void main(String[] args) throws Exception {
SmartArrayList<Integer> intList = new SmartArrayList<Integer>();
SmartArrayList<String> stringList = new SmartArrayList<String>();
intList.add(10);
intList.add(20);
intList.add(5);
stringList.add("Apfel");
stringList.add("Banane");
stringList.add("Kirsche");
System.out.println("Integer-Liste:");
intList.printElements();
System.out.println("\nString-Liste:");
stringList.printElements();
}
}

Binary file not shown.

View file

@ -0,0 +1,10 @@
import java.util.ArrayList;
public class SmartArrayList<T> extends ArrayList<T> {
public void printElements() {
System.out.print("Output of the list:");
for (T object : this) {
System.out.print(" " + object + ",");
}
}
}