Answers for "java string concatnate"

12

String concatenation in java

// String concatenation in java using concat() method
public class StringConcatMethodDemo
{
   public static void main(String[] args)
   {
      String str1 = "Flower ";
      String str2 = "Brackets";
      String str3 = str1.concat(str2);
      System.out.println(str3);
   }
}
Posted by: Guest on December-08-2020
0

java concat example

// Java program to demonstrate
// working of concat() method
  
class Gfg {
    public static void main(String args[])
    {
        String s = "Gfg";
        s = s.concat("! is the best.");
        System.out.println(s);
    }
}
Posted by: Guest on June-28-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language