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

What is a pdo connection?

1028


Why do we need cursor in pl sql?

1131


What is tuple in sql?

1070


how to create a test table in your mysql server? : Sql dba

1004


what are the properties and different types of sub-queries? : Sql dba

1032


How many aggregate functions are available there in sql?

979


What is identity column in sql server?

1045


How many columns should be in an index?

959


Explain dml and ddl?

986


when is the use of update_statistics command? : Sql dba

1046


what is the difference between delete and truncate commands? : Sql dba

1066


What is a clob in sql?

1013


What is the difference between sql and isql*plus?

1089


How do I delete a trigger?

961


What is not in sql?

941