kleiner fortschritt
parent
2c895010ba
commit
e7b26cb1cd
|
|
@ -1,20 +1,30 @@
|
|||
|
||||
public class Aufgabe1 {
|
||||
|
||||
private LinkedList list;
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
LinkedList list = new LinkedList(3);
|
||||
list.einfügen(3);
|
||||
|
||||
}
|
||||
|
||||
class Knoten {
|
||||
int zahl;
|
||||
|
||||
public Knoten(int zahl) {
|
||||
this.zahl = zahl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class LinkedList {
|
||||
int begin;
|
||||
|
||||
public static void einfügen(int zahl) {
|
||||
public LinkedList(int begin) {
|
||||
this.begin = begin;
|
||||
}
|
||||
|
||||
public static void einfügen(int zahl) {
|
||||
list.add(zahl);
|
||||
}
|
||||
|
||||
public static int auslesen(int index) {
|
||||
|
|
@ -26,7 +36,8 @@ class LinkedList {
|
|||
|
||||
}
|
||||
|
||||
System.out.println(IndexOutOfBoundsException(""));
|
||||
}
|
||||
System.out.println(IndexOutOfBoundsException);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue