Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program for finding the union of two integer array
in java?

Answer Posted / satish kumar

void union(int x[],int y[])
{


int n=x.length + y.length ;
int z[]=new int[n];
int p=x.length;
for(int i=0;i<x.length;i++)
{
z[i]=x[i];
}
int j=0;
for(int i=0;i<y.length;i++)
{
for(j=0;j<x.length;j++)
{
if(y[i]!=z[j])
{
continue;
}
else
{
if(y[i]==z[j])

break;
}
}
if(j==x.length)
z[p++]=y[i];
}

Is This Answer Correct ?    32 Yes 24 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

WHAT IS THE MEANING OF CONSTANT ...EXEEDS LENGTH LIMIT WHILE COPYING FROM PS FILE TO KSDS

2080


Write a program to find duplicate number from array in minimum time complexity.

1087


how to convert infix expression to prefix expression?

4251


which book we learned this mantis? how many version are realsed this mantis upto now?

1965


Hello...has anyone interviewed with Information Management Services(IMS)located in Silver Spring MD??If yes,what can you share about the programming test and the analytical test?

1992


code for connection from windows forms to sql server

2244


Busy waiting is a method whereas a taskwaits for a given event by continiously checking for an event to occur. What is the main problem with this approach

1905


Difference between debugging, running, executing of an application

4063


what is programmable BIST in today ic design

2152


What is easiest way to get the PL/i compiler,I didn't have found the compiler in my library. Is there any extra cost if we want to access the PL/1 programs?Actually we r having Mainframe rented training Ids

2221


Difference between views and index in sas programming

1534


hi i m deepak my shedule for NIC pi is 17 Apr please contact me if anybody has interview on same day or give me some idea who have faced

2035


what are all the validation we need to perform in data stage?

2426


can any one suggestion me present which course(except java,.net) has huge demand in the market?

2073


what are the advantages of sap on other software ?

2169