LETS START A RIOT OOO A RIOT
This commit is contained in:
parent
72f7a2e529
commit
a491769914
22 changed files with 234 additions and 0 deletions
7
Code/Steiner/smartArrayList/.vscode/settings.json
vendored
Normal file
7
Code/Steiner/smartArrayList/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"java.project.sourcePaths": ["src"],
|
||||
"java.project.outputPath": "bin",
|
||||
"java.project.referencedLibraries": [
|
||||
"lib/**/*.jar"
|
||||
]
|
||||
}
|
18
Code/Steiner/smartArrayList/README.md
Normal file
18
Code/Steiner/smartArrayList/README.md
Normal 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).
|
BIN
Code/Steiner/smartArrayList/bin/App.class
Normal file
BIN
Code/Steiner/smartArrayList/bin/App.class
Normal file
Binary file not shown.
BIN
Code/Steiner/smartArrayList/bin/SmartArrayList.class
Normal file
BIN
Code/Steiner/smartArrayList/bin/SmartArrayList.class
Normal file
Binary file not shown.
BIN
Code/Steiner/smartArrayList/src/App.class
Normal file
BIN
Code/Steiner/smartArrayList/src/App.class
Normal file
Binary file not shown.
18
Code/Steiner/smartArrayList/src/App.java
Normal file
18
Code/Steiner/smartArrayList/src/App.java
Normal 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();
|
||||
}
|
||||
}
|
BIN
Code/Steiner/smartArrayList/src/SmartArrayList.class
Normal file
BIN
Code/Steiner/smartArrayList/src/SmartArrayList.class
Normal file
Binary file not shown.
10
Code/Steiner/smartArrayList/src/SmartArrayList.java
Normal file
10
Code/Steiner/smartArrayList/src/SmartArrayList.java
Normal 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 + ",");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue