Advertisement
Guest User

Untitled

a guest
Apr 8th, 2020
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. //**TEST ONE */
  2. public class Sieminski4 {
  3.  
  4.     public static void main(String []args) {
  5.  
  6.            boolean uniqueMatch = true;
  7.            int[] arr1 = {1,2,3,4,5,6,1,2,3,4,5,6};
  8.            int[] arr2 = {1,1,1,9,8,7,4,4};
  9.  
  10.            findUniqueMatch(arr1, arr2, uniqueMatch);
  11.     }
  12.  
  13.     public static void findUniqueMatch(int[] a, int[] b, boolean c){
  14.         c = false;
  15.         for(int i : a) {
  16.             for (int j : b) {
  17.                 if (i==j) {
  18.                     System.out.print(i + " ");
  19.                     c = true;
  20.                 }
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement