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

How do you declare a destructor in java?

1003


What is a linkedhashmap java?

1002


What is complexity and its types?

1031


What is a arraylist in java?

1068


what is daemon thread and which method is used to create the daemon thread? : Java thread

972


Can a class have multiple superclasses?

1166


Write a program to find maximum and minimum number in array?

1001


What do you understand by the term wrapper classes?

1004


What is the size of arraylist in java?

1028


How can we pass argument to a function by reference instead of pass by value?

1111


What is an off by one error in java?

955


Write code to implement bubble sort in java?

994


What is json parser in java?

1058


What are the 4 versions of java?

1166


What is computer compiler?

1000