BeanUtil Array Utils Example : Bean Utils « Apache Common « Java






BeanUtil Array Utils Example

import org.apache.commons.lang.ArrayUtils;

public class ArrayUtilsExampleV1 {

  public static void main(String args[]) {

    long[] longArray = new long[] {10000, 30, 99};
    String[] stringArray = new String[] {"abc", "def", "fgh"};

    long[] clonedArray = ArrayUtils.clone(longArray);
    System.err.println(
      ArrayUtils.toString((ArrayUtils.toObject(clonedArray))));

    System.err.println(ArrayUtils.indexOf(stringArray, "def"));

    ArrayUtils.reverse(stringArray);
    System.err.println(ArrayUtils.toString(stringArray));
  }
}
           
       








BeanUtilArrayUtilsExampleV1.zip( 392 k)

Related examples in the same category

1.Get Mapped Property
2.BeanUtils Collections 2
3.BeanUtils Date Utils
4.BeanUtils get Property from Dynamic Beans
5.Use Bean Utils to get property value from object
6.Bean Utils: deal with collections