Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.HashMap;
- import java.util.Map;
- public class Main {
- public static void main(String[] args) {
- int count = 6;
- int[][] arr;
- arr = new int[][]{
- {2,3,0},
- {1,4,0},
- {1,0},
- {2,0},
- {6,0},
- {5,0},
- };
- EnteringArray(count, arr);
- FillDictionary(dictionary, count);
- System.out.println(" ");
- System.out.println(dictionary.toString());
- }
- public static void EnteringArray(int count, int[][] arr){
- for (int i=0; i<count; i++){
- System.out.println(" ");
- for(int j=0; j<arr[i].length; j++){
- System.out.print(arr[i][j]);
- }
- }
- }
- public static void FillDictionary(Map<Integer, Boolean> dictionary, int count){
- for (int i=1; i<=count; i++){
- dictionary.put(i,false);
- }
- }
- public static Map<Integer, Boolean> dictionary = new HashMap<Integer, Boolean>();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement