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 rtm in testing?

570


What is delimiter sql?

539


give the syntax of grant and revoke commands? : Sql dba

607


What is before trigger?

544


What are the 3 modes of parameter?

675






how can we repair a mysql table? : Sql dba

534


If a cursor is open, how can we find in a pl/sql block?

667


Can you do multiple joins in sql?

541


How do I tune a sql query?

508


What is pragma in pl sql?

590


What does <> sql mean?

528


Enlist the advantages of sql.

565


Explain the difference between 'between' & 'and' operators in sql

524


What are the steps for performance tuning.

833


What is nosql db?

532