Menu

How to use StringArrayVector

to reverse a string

/**
 * Reverse test.
     * @author: Yan Tang, VUB, 2009
 */
public static void reverseTest() {
    StringArrayVector vector = new StringArrayVector();
    Vector<String[]> v = new Vector<String[]>();
    v.add(new String[] { "1", "2", "3" });
    v.add(new String[] { "3", "4", "5" });
    vector.printToconsole(v);
    v = vector.reverse(v);
    vector.printToconsole(v);
}
Posted by Yan Tang Demey 2012-10-18

Log in to post a comment.