Java tutorial
//package com.java2s; import java.util.List; public class Main { public static void clearList(List... lists) { int length = lists.length; for (int i = 0; i < length; i++) { List l = lists[i]; if (l == null) { continue; } l.clear(); l = null; } } }