Java examples for Collection Framework:Vector
Find Minimum element of Vector
import java.util.Vector; import java.util.Collections; public class Main { public static void main(String[] args) { /*w w w .ja va2 s .c o m*/ Vector v = new Vector(); v.add(new Double("4.14")); v.add(new Double("5.13")); v.add(new Double("2.12")); v.add(new Double("7.19")); v.add(new Double("3.15")); Object obj = Collections.min(v); System.out.println("Minimum Element of Java Vector is : " + obj); } }