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
Difference between HTML and DHTML?
what is the work of 1tier,2tier,&ntier? Plz Explain it!
how do u handle table control inbdc explain the process in steps iwant the answer in urgent please forward this even i know how to explain there
what is meant by life cycle of a business
what is the use of occurs 10 or (any number) in the internal table declaration with header line.
I want to pass .pdf files as OlE Object to crystal report through VB6. Please any one guid me...
You are given a dictionary of all valid words. You have the following 3 operations permitted on a word: delete a character, insert a character, replace a character. Now given two words - word1 and word2 - find the minimum number of steps required to convert word1 to word2. (one operation counts as 1 step.)
How will you prove that java swing is multithreaded?
Delta 5 weight scale not connect with oracle application what i can do?
Write a shell program. Enter number of days from keyboard. Find out the number of years, month and days it contains
what are all the validation we need to perform in data stage?
What is the purpose of
which worker is involved in all the phases of SDLC?
HOW TO FIND NUMBER OF TWOS IN N!(N FACTORIAL)??
Explain what is OOPS and its concepts?