hi all,
consider the following program:
import java.util.*;
public class VecNum
{
public static void main(
String argv[])
{
Vector v = new Vector();
v.add(new Integer(1));
v.add(new Integer(2));
for(int i=0; i < v.size();i ++)//line1
{
Integer iw =(Integer) v.get(i);//line2
System.out.println(iw.intValue());//line3
}
}
}
In the above program i have some queries:
1.why we need to use vector for wrapping all the integer values
2.what is the purpose of using line1,line2,line3
3.when i compile this program its generating errors
tx
carl..
tx