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
what is the BAM? where we can use it in BizTalk server?
Write a program to find duplicate number from array in minimum time complexity.
How will you prove that java swing is multithreaded?
Give examples of macro quoting function?
hi, all this is shoba m.c.a . i have learned abap but no oppurtunities right now as fresher , right now i want to learn any course on demand any one pls suggest me good course and institute in hyderabad
Suppose server object is not loaded into the memory, and the client request for it , what will happen?
what are the advantages of sap on other software ?
Explain what is OOPS and its concepts?
What is the use of sas software? Is sas and sap are different?
when will triggars the at new event in abap and web dybn pro?
How many forms can you create in a Visual Basic 6 Standard EXE project? Is there any limit on that?
iam confused among testing ,.net and java. can anybody help me.
write the a cl program with the following specification A. Accept 2 parameters-date and date type B. if date type is J then convert date to *MDY format C. if date type is M convert date to *JUL format 4.send a program message with the value of converted date Please explain for each with coding?
Difference between delegates and Events?
Q2. A memory location has physical address D5687h. Compute: a. The offset address if the segment number is D445h. b. The segment number if the offset address is B577h.