Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Vem do pacote conexao
- package conexao;
- // Importando os seguintes drivers de BD
- import java.sql.Connection;
- import java.sql.DriverManager;
- // Classe publica por conta que outras classes vão manipular ela
- public class connectionFactory {
- // Metodo conectar utiliza o throws exception
- public Connection conectar() throws Exception{
- // Retorna a string de conexao
- return DriverManager.getConnection
- ("jdbc:oracle:thin:@oracle.fiap.com.br:1521:ORCL",
- "rm75447","080697");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement