Testeksamne, og andre ting
This commit is contained in:
14
Testeksamen/kode/Example.java
Normal file
14
Testeksamen/kode/Example.java
Normal file
@@ -0,0 +1,14 @@
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
boolean m[][] = { { true, false, true, true },
|
||||
{ true, false, true, false },
|
||||
{ true, false, true, true } };
|
||||
System.out.println("++++++++++++");
|
||||
Grid g = new Grid(m);
|
||||
System.out.println(g);
|
||||
System.out.println("++++++++++++");
|
||||
g.update();
|
||||
System.out.println(g);
|
||||
System.out.println("++++++++++++");
|
||||
}
|
||||
}
|
||||
15
Testeksamen/kode/Main.java
Normal file
15
Testeksamen/kode/Main.java
Normal 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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user