Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class array {
- //Attribute
- int x = 0;
- int zeilen1;
- int[][] arrayListe;
- public static int spalten11;
- //Konstruktoren
- public array(int spalten, int zeilen)
- {
- arrayListe = new int[spalten][zeilen];
- zeilen1 = zeilen;
- spalten11 = spalten;
- }
- //Methoden auslesen
- public void fuellen()
- {
- for(int ze = 0; ze < zeilen1; ++ze)
- {
- if(x != 3)
- {
- for(int sp = 0; sp < arrayListe.length; sp++)
- {
- arrayListe[ze][sp] = 0;
- }
- }
- else
- {
- for(int sp = 0; sp < arrayListe.length; sp++)
- {
- arrayListe[ze][sp] = 1;
- }
- }
- }
- //return "";
- }
- public void ausgeben()
- {
- for(int i = 0; i < arrayListe.length; i++)
- {
- for(int j = 0; j < arrayListe[0].length; j++)
- {
- System.out.print(arrayListe[i][j]);
- System.out.print("\t");
- }
- System.out.print("\n");
- }
- }
- }
Add Comment
Please, Sign In to add comment