Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.ArrayList;
- public class test {
- public static void main (String[]args){
- boolean[][] BoolFeld = new boolean [4][4];
- for (int i=0; i<BoolFeld.length; i++)
- {
- for (int j=1; j<BoolFeld[i].length; j++)
- {
- if(j%2!=0)
- {
- System.out.println("current j:"+j);
- BoolFeld[i][j]=true;
- }
- }
- }
- for (int i = 0; i < BoolFeld.length; i++){
- for(int j = 0; j < BoolFeld[0].length; j++){
- System.out.print(BoolFeld[i][j]+"|");
- }
- System.out.println();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement