Logo 
Search:

Java Articles

Submit Article
Home » Articles » Java » Homework HelpRSS Feeds

Program to show an example of Concatination of Strings

Posted By: Ayman Hashmi     Category: Java     Views: 1671

A Java Program to show an example of Concatination of Strings.

Code for Program to show an example of Concatination of Strings in Java

publicclass JAVA_044
 {
    publicstaticvoid main(String[] args)
    {
       String String_1="Many ";
       String String_2="hands ";
       String String_3="make light work";

       String String_4;

       String_4=(String_1+String_2+String_3);

       System.out.println(String_4);

       int nHands=99;

       String_4=(nHands + " " + String_2 + String_3);

       System.out.println(String_4);

       String_4=("fifty five is " + 5 + 5);

       System.out.println(String_4);

       String_4=( 5.5 + 5 + " is ten point five");

       System.out.println(String_4);
    }
 }
  
Share: 


Didn't find what you were looking for? Find more on Program to show an example of Concatination of Strings Or get search suggestion and latest updates.

Ayman Hashmi
Ayman Hashmi author of Program to show an example of Concatination of Strings is from Hyderabad, Pakistan.
 
View All Articles

 

Other Interesting Articles in Java:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!