logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • What are the steps required to execute a query in JDBC?


  • Correct Answer
  • First we need to create an instance of a JDBC driver or load JDBC drivers, then we need to register this driver with DriverManager class Then we can open a connection By using this connection , we can create a statement object and this object will help us to execute the query 


  • Technology problems


    Search Results


    • 1. What is JDBC Driver ?
    • Discuss
    • 2. What is a class, member and local variable?
    • Discuss
    • 3. X implements Y, Z Arguments: 1. X should be class 2. Y, Z should be interfaces

    • Options
    • A. Only 1 is true
    • B. Only 2 is true
    • C. Both 1 and 2 are true
    • D. None
    • Discuss
    • 4. public abstract class Shape { private int x; private int y; public abstract void draw(); public void setAnchor(int x, int y) { this.x = x; this.y = y; } } Which two classes use the Shape class correctly?

    • Options
    • A. public class Circle implements Shape { private int radius;
    • B. public abstract class Circle extends Shape { private int radius; }
    • C. public class Circle extends Shape { private int radius; public void draw();
    • D. None
    • Discuss
    • 5. public abstract class Shape { private int x; private int y; public abstract void draw(); public void setAnchor(int x, int y) { this.x = x; this.y = y; } } Which two classes use the Shape class correctly?

    • Options
    • A. public class Circle implements Shape { private int radius;
    • B. public abstract class Circle extends Shape { private int radius; }
    • C. public class Circle extends Shape { private int radius; public void draw();
    • D. None
    • Discuss
    • 6. What is the difference between a constructor and a method?
    • Discuss
    • 7. What is an abstract class?
    • Discuss
    • 8. How will you define an abstract class?
    • Discuss
    • 9. What is the difference between array and ArrayList ?
    • Discuss
    • 10. What is diamond problem?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment