Yes, Java is able to communicate with large number of databases. As PhiberOptik pointed out for this you will also need driver Connector/J.
I will recommend that you read JDBC Database Access tutorial by Sun for starter...