Arrays.copyOf CharSequence : CharSequence « File Input Output « Java






Arrays.copyOf CharSequence

  

import java.util.Arrays;

public class Copy {
  public static void main(String[] args) {
    String[] sa = { "First", "Second", "Third" };
    CharSequence[] csa;
    csa = Arrays.copyOf(sa, sa.length, CharSequence[].class);
    for (int i = 0; i < csa.length; i++)
      System.out.println(csa[i].length());
  }
}

   
  








Related examples in the same category

1.A contiguous range of characters, optionally negated.