What are the steps in the jdbc connection?
Answer / Mayank Vishnoi
"1. Load the JDBC driver for the database you are using (using Class.forName()).n2. Establish a connection to the database by calling DriverManager.getConnection(). This method requires a URL, username and password as arguments.n3. Create a Statement object, which represents a SQL statement that will be executed on the database.n4. Execute the SQL query using the execute() method of the Statement object.n5. Process the results returned from the execution using appropriate methods like getInt(), getString(), etc.n6. Close all the resources (Connection, Statement and ResultSet) to free up database connections for other applications."
| Is This Answer Correct ? | 0 Yes | 0 No |
What is java instanceof operator?
What is the core java?
Is java ee a framework?
suppose in a class there is a code like this: { Set hs=new Hashset(); hs.add(new Emp("kathy",1000)); hs.add(new Emp("kathy",2000)); } how can u avoid the above code in your class as set won't allow duplicate objects?
What is finally in exception handling?
Explain reverse a linked list iterative solution in java?
Is boolean a data type in java?
in a console we r giving java <class name> if r pressing enter where it'll goes
How to prevent to create multiple objects of a java class?
How many threads does a core java have?
What is the purpose of static keyword in java?
When should the method invokelater() be used?