and then as per my requirements, i have added strings in it. like error.add(); like this. so, now at some time, i want this list to be empty, so i was doing error=null; which is giving me error of null pointer exception. so please help me how to do this? how can i make this list as empty ?