1) When posting code, use code tags so it will be readable: http://forums.oracle.com/forums/ann.jspa?annID=1429 2) "I am getting an error" means nothing. Do you think there's only one possible error that can occur in Java code, and only one possible thing that can cause it? If not--that is, if you're aware that there can be different errors and different causes--then why did ...