i need your help to extract the element in array list..
Vector<int> phrasecordinates = CalculatePhraseCordinates(renderedop.getSourceImag e(0),awordlinecordinates);
if (phrasecordinates != null)
Vector<RenderedOp> temp_line = new Vector<RenderedOp>();
System.out.println("Start checking line");
for (int j=0;j<phrasecordinates.size() ;j++)
int blockcord = phrasecordinates.get(j);
int sortVector = phrasecordinates.get(j);
for(int c =0; c< sortVector.length; c++)
there is program that i had been created to list all the element,now i want to extract only 4 element in the array list..
thanks for your help..;)
How you going to extract, based on what? Can you explain bit more.
OK, first of all, Vector and ArrayList do the same thing, but they are not the same. I suggest using ArrayList, since Vector is synchronized for threading, and you are not using threads.
Second, you are creating Vectors all over, and you don't even use half of them. That tells me you are not quite sure what you are trying to accomplish.
Third, System.gc() is unnecessary. The system will gc itself as needed, and doing gc right before you shut the system down is not accomplishing anything.
Here's something helpful, after all my criticism.
Get out a piece of paper and a pencil. Actually, at work, I have a dry-erase board next to my desk. Draw a picture of what you want to accomplish, or write it out in plain language, so that a non-programmer could understand. When your picture or written description simple and clear, then you know you understand what you want to accomplish. Turning that into code is then relatively simple.