How to swap two String values without using a
third variable?
Answer Posted / badar awan
public class B
{
public static void main(String [] args)
{
String a = "Badar" ;
String b ="Asad";
a= a+b;
b = a.substring(0,(a.length()-b.length()));
a = a.substring(b.length(),(a.length()));
System.out.println("a == "+ a);
System.out.println("b == "+ b);
}
}
| Is This Answer Correct ? | 9 Yes | 5 No |
Post New Answer View All Answers
MOV.CB 007H,ADCON1 MOVE.CT 001H,_OPTION_REG_7 MOV.CB 007H,CMCON
how to display xisheet in list box in c# .net
what will we require to build project with the help of oracle
WS-NUM PIC S9(05)V(02) SIGN TRAILING SEPARATE MOVE '0050000+' TO WS-NUM The value stored is 00500,00+ MOVE '0050000-' TO WS-NUM Then what is the value will be stored in WS-NUM? Am getting '-00500,00'.....>>> What should I declare to WS-NUM so that I can get correct values for both + & - signs.
is it possible to learn sap from book without any tutorial. if yes please mention the beginner,s book of sap and also make your valuable advice for self study of sap .
What binary value will be internally stored for NULL for the type S9(1) COMP 3 in mainframe
what are the 3 forms of a prolog term
qtp 9.2 14 days demo version was expired.I uninstalled how to reinstall this again
how can we implement locks in plsql?
what is the diffrence between software and hardware language?
please any one pass file aid,xpeditor and endeavor tools
what is the current salary package in India for a lamp programmer
what is delegate and delegation model give the real live example on delegate model
What do you understand by modular programming?
what does mean and stack mean in genral programming?