What, in the code, suggests you that it should not work? In the method, the passed parameter is not accessed anywhere. So there is no chance of a NPE. All it is doing is incrementing the counter and assigning the passed value to lastE. So when you pass null, lastE is assigned null. But it is ok as it is not accessed anywhere. HTH, Paul ------------------ http://pages.about.com/jqplus Get Certified, Guaranteed!