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

how to remove header and footer in jcl using sort utility

5548


what is d main diff between the java and .net framework

2001


How can recruiter justified that the candidate is expert in Algorithm and datastructure for Software product development ?

1940


What is the difference between COM and CORBA?

1212


how to check single or double byte in struts

1987


How to know we are in home page of a web application using QTP

2449


why we use abstract word in abstract window toolkit in java language.

2185


9.Difference between even and odd signals?explain with the diagram?

3389


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

2271


How to use string functions in QTP?give some examples

7897


Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fit" instead of the number and for the multiples of five print "Bit". For numbers which are multiples of both three and five print "FitBit".

2391


As per interoperatbility programs written in one language can be used by other language. How can we restrict the features of one language (say C#) in the programmer written in another language (say VB)..for example we have some features like operator overloading which is possible C#.NET (not in VB.NET), how can we restrict that when we are using this code in VB.NET.

1945


shall we execute our java programmes in jre

2269


i am exeprienced person what is selection process

1636


Diffrence between 2.0,3.0,3.5,4.0. versions of .net?

3152