Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Difference between HTML and DHTML?

2136


what is the work of 1tier,2tier,&ntier? Plz Explain it!

2429


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

2169


what is meant by life cycle of a business

2223


what is the use of occurs 10 or (any number) in the internal table declaration with header line.

1883


I want to pass .pdf files as OlE Object to crystal report through VB6. Please any one guid me...

3003


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.)

1030


How will you prove that java swing is multithreaded?

2253


Delta 5 weight scale not connect with oracle application what i can do?

2278


Write a shell program. Enter number of days from keyboard. Find out the number of years, month and days it contains

2020


what are all the validation we need to perform in data stage?

2370


What is the purpose of element of in Ajax

2424


which worker is involved in all the phases of SDLC?

2109


HOW TO FIND NUMBER OF TWOS IN N!(N FACTORIAL)??

2217


Explain what is OOPS and its concepts?

1071