Yamini,
According to my understanding once we exit java application then all opened database connections from this application will be closed automatically
First of all, I agree with everyone who has said to close the connection. It is a good habit and important to do.
The connection being closed isn't tied to the application exiting though. It is tied to the database connection timeout. When a connection hasn't been used in a certain length of time, it can (sometimes) be recovered. The connection pool does not know whether the application has exited.