Tag,
ich hab hier ein Prog, das eine Matrix erstellen soll.
Der Quellcode wird weder rot markiert nocht gibt es einen Fehler.
Aber wenn ich es starte passiert einfach nix.
Ich seh nicht was das Problem ist bzw. warum Eclipse mir nix anzeigt, hat jemand eine Idee?
Ich danke euch schon mal für Hilfe
ich hab hier ein Prog, das eine Matrix erstellen soll.
Der Quellcode wird weder rot markiert nocht gibt es einen Fehler.
Aber wenn ich es starte passiert einfach nix.
Ich seh nicht was das Problem ist bzw. warum Eclipse mir nix anzeigt, hat jemand eine Idee?
Code:
public class matrix implements intmatrixIF{
public int rows;
public int columns;
int [][] a= new int[rows][columns];
public matrix (int x, int y){
rows=x;
columns=y;
}
@Override
public int columns() {
return this.columns;
}
@Override
public int rows() {
return this.rows;
}
@Override
public void set(int i, int j, int value) {
a[i][j]= value;
}
@Override
public int get(int i, int j) {
return a[i][j];
}
@Override
public void print() {
for (int i = 1; i <rows; i++);
for (int j = 0; j<columns; j++);
System.out.println(a[rows][columns]);
System.out.println();
}
}
Ich danke euch schon mal für Hilfe