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 we can write the string concatenation program in java.

Answer Posted / ashwini kumar vatsa

In java first all the integer or float etc declared are
converted into string so when we write
System.out.println("the name is"+x);where x is any primitive
type then first x is converted into string then it
concatenates with the other string so for concatenations
with other string we must have +operator.
class xyz{
static int x;
public static void main(String args[]){
xyz yz=new xyz();
yz.x=10;
System.out.println("the output is"+x);//here concat done
}
}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we sort a map in java?

1030


Which data type is a class in java?

992


How many unicode characters are there?

1037


What are the main features of java?

963


What are multiple inheritances? Is it supported by java?

943


Can list contain null in java?

1077


Why java is a platform independent? Explain

1072


What is method reference in java?

1124


What is the difference between equals() and == in java?

967


How to avoid memory leak in java?

1125


What is the buffer limit?

1023


Do loops java?

1005


Why do we use return statement?

1026


Can a abstract class be declared final?

988


Give any two differences between C++ and java.

1133