Testeksamne, og andre ting

This commit is contained in:
2025-12-03 11:33:58 +01:00
parent 7d790d8126
commit 2c91d6de4a
17 changed files with 3337 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
public class Main {
public static void main(String[] args) {
Vektor x = new Vektor("Kasper", 123456789);
Rektor y = new Rektor("Jesper", 3.14);
Lektor z = new Lektor("Jonathan");
Person[] a = { x, y, z };
printArray(a);
}
public static void printArray(Object[] a) {
for (int i = 0; i < a.length; i++) {
System.out.println(i + " " + a[i]);
}
}
}