Mittwoch lesson

This commit is contained in:
sageTheDM 2024-12-19 07:51:04 +01:00
parent e0efeb82ef
commit 8901dea11b
61 changed files with 663 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.

View file

@ -0,0 +1,28 @@
import java.io.*;
public class App {
public static void main(String[] args) {
try {
readFile("test.txt");
} catch (FileNotFoundException e) {
System.err.println("Error: The file was not found. Please check the file path.");
} catch (IOException e) {
System.err.println("Error: An I/O error occurred while reading the file.");
} catch (Exception e) {
System.err.println("An unexpected error occurred: " + e.getMessage());
}
}
private static void readFile(String fileName) throws IOException {
FileReader f = new FileReader(fileName);
try {
int c;
while ((c = f.read()) != -1) {
System.out.print((char) c);
}
} finally {
f.close();
}
}
}

View file

@ -0,0 +1,22 @@
🎉 Super! 🎉
Du hast es geschafft.
Herzliche Gratulation!
🌟 STEINER 🌟
Ein Hauch von Magie in der Luft!
✨ Die Sterne funkeln, während die Gedanken fliegen. ✨
🔮 Zufällige Gedanken:
Kaffeetassen tanzen im Regen.
Ein fliegender Teppich voller Bücher.
Die Farben des Windes singen Lieder.
🌈 Lass die Kreativität sprudeln!
Was wäre, wenn die Fische die Wolken fangen könnten?
Ein Abenteuer im Land der Träume wartet auf dich!