Hi,
if we have the inPut={"A","B","A","C","B"} then we want the non-repeated array with element as outPut={"A","B","C"}
The following code showing the "Error #: 361 : variable required, but value found at line 12, column 34".
Vector inPut=new Vector();
Vector outPut=new Vector();
int m=0;
for(int i=0; i < inPut.size(); i++){
if(inPut.elementAt(i) == null) continue;
else{
for(int j=i+1; j < inPut.size(); j++){
if(inPut.elementAt(i) == inPut.elementAt(j))
// Error Line=12 inPut.elementAt(i) = null;
} // inner for
} // else
outPut.elementAt(m) = inPut.elementAt(i);
System.out.println("OutPut=" +outPut.elementAt(m));
m++;
} // outer for
Kind Regards
Rashid.
rhkhokhar@hotmail.com
if we have the inPut={"A","B","A","C","B"} then we want the non-repeated array with element as outPut={"A","B","C"}
The following code showing the "Error #: 361 : variable required, but value found at line 12, column 34".
Vector inPut=new Vector();
Vector outPut=new Vector();
int m=0;
for(int i=0; i < inPut.size(); i++){
if(inPut.elementAt(i) == null) continue;
else{
for(int j=i+1; j < inPut.size(); j++){
if(inPut.elementAt(i) == inPut.elementAt(j))
// Error Line=12 inPut.elementAt(i) = null;
} // inner for
} // else
outPut.elementAt(m) = inPut.elementAt(i);
System.out.println("OutPut=" +outPut.elementAt(m));
m++;
} // outer for
Kind Regards
Rashid.
rhkhokhar@hotmail.com