... but after the loop terminates i get an error message saying "Null pointer assignment, abnormal program termination.
programmersheaven.com