Actually I want to do to set the pointer of arraylist to index which I will give, and my program will check if there's still elements then it will remove all from that index which I have given.
public void removefromindex(int index)
{
for (int j = notes.size(); j >notes.size(); j++)
{
notes.remove(j);
}
}
public void deleteAll(){
for (Iterator<Note> it = notes.iterator(); it.hasNext(); )
{
Note note = it.next();
it.remove();
}
}