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 data type in database?

546


When is the update_statistics command used?

572


what is meant by nl2br()? : Sql dba

566


Explain normalization and what are the advantages of it?

518


What is cursor in pl sql with examples?

481






What do you think about pl/sql?

534


Can there be more than one function with a similar name in a pl/sql block?

547


How do you select unique values in sql?

500


What is query execution plan in sql?

571


what is the difference between truncate and delete statement? : Transact sql

550


Does a join table need a primary key?

533


Can unique keys be null?

486


What are the set operators in sql?

557


ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..

2007


How many types of cursors supported in pl/sql?

596