Java 实例 - 旋转向量
Java 教程
· 2019-02-11 14:57:52
以下实例演示了使用 swap() 函数来旋转向量:
Main.java 文件
import java.util.Collections;
import java.util.Vector;
public class Main {
public static void main(String[] args) {
Vector<String> v = new Vector();
v.add("1");
v.add("2");
v.add("3");
v.add("4");
v.add("5");
System.out.println(v);
Collections.swap(v, 0, 4);
System.out.println("旋转后");
System.out.println(v);
}
}
以上代码运行输出结果为:
1 2 3 4 5 旋转后 5 2 3 4 1
点击查看所有 Java 教程 文章: https://codercto.com/courses/l/12.html
Parsing Techniques
Dick Grune、Ceriel J.H. Jacobs / Springer / 2010-2-12 / USD 109.00
This second edition of Grune and Jacobs' brilliant work presents new developments and discoveries that have been made in the field. Parsing, also referred to as syntax analysis, has been and continues......一起来看看 《Parsing Techniques》 这本书的介绍吧!