提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
查找向量的最大元素
import java.util.Vector; import java.util.Collections; /** from nowjava.com - 时代Java**/ public class Main { public static void main(String[] args) { Vector v = new Vector(); v.add(new Double("3.1")); v.add(new Double("5.1")); v.add(new Double("2.1")); v.add(new Double("7.1")); v.add(new Double("3.1")); Object obj =