Answers for "how to join strings in java"

6

java concatenate strings

public class Concat {
    String cat(String a, String b) {
        a += b;
        return a;
    }
}
Posted by: Guest on June-29-2020
0

join strings in java

String a = "Hello";
String b = " World";
String c = a+b;
Posted by: Guest on May-25-2021
0

Java String join

String.join(" - ", "This", "course", "is", "awesome");
// ou
String.join(" - ", new String[]{"This","course","is","awesome"});
				// retourne "This - course - is - awesome"

String.valueOf(22); // retourne "22"
Posted by: Guest on October-04-2021
0

how do you combine 2 strings

-By  using (+) operator
-By  using concatenate method (concat()).
                      String strconcat3=strconcat2.concat(strconcat);

-By StringBuffer
-String strconcat= new StringBuilder().append("matt")
                                .append("damon").toString();
                                
-By StringBuilder
- String strconcat2= new StringBuffer()
                  .append("matt").append("damon").toString();
Posted by: Guest on January-14-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language