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 the functionality of the function htmlentities? : Sql dba

520


What is difference between stored procedures and application procedures?

567


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

568


Where do we use pl sql?

550


how to shut down the server with 'mysqladmin'? : Sql dba

543






how many sql dml commands are supported by 'mysql'? : Sql dba

567


What is raid? How does it help storage of databases?

599


Is sql workbench free?

530


How to get unique records from a table?

521


What is primary key in db?

517


What is rowtype?

562


What is exit statement?

543


what is the difference between a having clause and a where clause? : Sql dba

517


What are the two virtual tables available at the time of database trigger execution?

632


Is pl sql different from sql?

530