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...

there are 2 variables called x and y ,x contains 1,2 and y
contains 3,4 we have to swap the values from x to y and y
to x with out using dummy variables and it can be done only
by using a single statement ? how?

Answer Posted / sheshadri

String x="1,2";
String y="3,4";
x=(y+"$"+(y=x)).split("[$]")[0];

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain cursor types?

1002


Is grant a ddl statement?

887


Where is pl sql used?

943


What is over () in sql?

931


How does postgresql compare to mysql?

1019


What is an index in sql with example?

959


What is aggregate function in sql?

1021


How do sql triggers work?

1022


Which join is like inner join?

1006


How do I find duplicates in sql?

916


What do you mean by stored procedures? How do we use it?

982


What is the meaning of disabling a trigger?

1152


what is the difference between a web-garden and a web-farm? : Sql dba

1063


What is data profiling in sql?

1057


what are the different index configurations a table can have? : Sql dba

981