Click here to watch in Youtube :
https://www.youtube.com/watch?v=vjUPeAaUV1k&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge
Java Tutorial : Java String [join(CharSequence delimiter,CharSequence... elements) method] |
/* * public static String join(CharSequence delimiter, * CharSequence... elements) * * Parameters: * ----------- * delimiter - the delimiter that separates each element * * elements - the elements to join together. * * Returns: * -------- * a new String that is composed of the elements * separated by the delimiter. * * Throws: * ------- * NullPointerException - If delimiter or elements is * null */ public class JoinDemo { public static void main(String[] args) { String str1 = "welcome"; String str2 = "to"; String str3 = "India"; String joinString = String.join("_", str1, str2, str3); System.out.println("JoinString = " + joinString); } }
JoinString = welcome_to_India
https://sites.google.com/site/javaee4321/java/StringDemo_join_App.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/StringDemo_join_App
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/89dfdef018d2970576505c9f498b5e4f28628c35/BasicJava/StringDemo_join_App/?at=master
See also:
No comments:
Post a Comment