Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

intersection of two arrays java

 public static void findIntersection(int arry1[],int arry1size,int arry2[],int arry2size){
    	HashSet<Integer> hs=new HashSet<Integer>();
    	for(int i=0;i<arry1size;i++){
    		for(int j=0;j<arry2size;j++){
    			if(arry1[i]==arry2[j]){
    				hs.add(arry1[i]);
    			}
    		}
    	}
    	
    	System.out.println(hs);
    }
Comment

PREVIOUS NEXT
Code Example
Java :: reverse a doubly linked list 
Java :: 2-dimensional Array java 
Java :: 1 elemenet array java 
Java :: radiogroup get selected item android 
Java :: java assert 
Java :: How to change integers into float in java 
Java :: qr code spring boot 
Java :: java string util if empty default 
Java :: what is abstraction in java 
Java :: Java long Keyword 
Java :: Java Remove ArrayList Elements 
Java :: how to convert double to int in java 
Java :: Java @Deprecated annotation 
Java :: get image file path 
Java :: lambda expression java 
Java :: constructor of class that extends another class 
Java :: Java Singleton Class Syntax 
Java :: declare matrix in java 
Java :: java design patterns 
Java :: Java char Keyword 
Java :: java long literal 
Java :: generics in java 
Java :: super class java 
Java :: android videoview not smooth for mp4 
Java :: enter a word and print letters java 
Java :: start hadoop and yarn with java 
Java :: android pick up photo from local device 
Java :: add image in loggin view spring boot security 
Java :: gson to class 
Java :: java returning an comparable array of inorder traversal of binary tree 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =