tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 
 Tools and Libs > Open Symphony Core > Join Array

Join Array 

OSCore (Open Symphony Core) is a java library with lot of utilities and reusable components. This requires the libraries oscore-2.2.6.jar, mail.jar to be in classpath. The following example shows using TextUtils.join() API.

File Name  :  
com/bethecoder/tutorials/oscore/JoinArrayTest.java 
Author  :  Sudhakar KV
Email  :  kvenkatasudhakar@gmail.com
   
package com.bethecoder.tutorials.oscore;

import com.opensymphony.util.TextUtils;

public class JoinArrayTest {

  /**
   @param args
   */
  public static void main(String[] args) {

    String joinStr = TextUtils.join("."new String [] { "1""2""3""4""5""6" });
    System.out.println(joinStr);
    
    joinStr = TextUtils.join("-:-"new String [] { "ONE""TWO""THREE""FOUR" });
    System.out.println(joinStr);
  }

}
   

It gives the following output,
1.2.3.4.5.6
ONE-:-TWO-:-THREE-:-FOUR


                    Print

   



Books Recommendation

 
 
bl  br