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

How do I count duplicates in sql?

1105


What is mutating table error?

1182


What is hibernate and its relation to sql?

1123


What are the parameter modes supported by pl/sql?

1108


what is rdbms? : Sql dba

1012


Is null operator in sql?

1041


Differentiate pl/sql and sql?

1070


How many joins in sql?

1011


what is acid property in database? : Sql dba

1029


What are the benefits of pl/sql packages?

1107


what are the join types in tsql? : Transact sql

1064


what are date and time data types in mysql? : Sql dba

971


Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?

1015


what is 'mysqladmin' in mysql? : Sql dba

1026


Is sqlite free?

975