what is type of statement in jdbc connection?

Answers were Sorted based on User's Feedback



what is type of statement in jdbc connection?..

Answer / sukanta

1. Statement
2. PrepareStatment
3. CallableStatement

Is This Answer Correct ?    6 Yes 0 No

what is type of statement in jdbc connection?..

Answer / manoj kumar sahu(secon pvt.ltd

There are three types of statements
1.statement
2.precompiled/predefined statement
3.collable statement.

Is This Answer Correct ?    5 Yes 4 No

what is type of statement in jdbc connection?..

Answer / qim2010

Once a connection is obtained we can interact with the
database. The JDBC Statement, CallableStatement, and
PreparedStatement interfaces define the methods and
properties that enable you to send SQL or PL/SQL commands
and receive data from your database.

They also define methods that help bridge data type
differences between Java and SQL data types used in a database.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Difference between Primary key and unique key?

4 Answers  


How can you say HashMap is syncronized?

14 Answers   Arete, IBM,


What is variable length arguments in java?

0 Answers  


Explain the difference between protected and default access.

0 Answers  


What is access modifiers?

1 Answers   Cap Gemini,






What’s meant by anonymous class?

0 Answers  


What is Collections API?

1 Answers  


Why can't we make a class private in java?

0 Answers  


Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

0 Answers  


what is the diff between Servletcontext and servletconfig?

5 Answers  


Question 5 [15] Consider the following classes, illustrating the Strategy design pattern: import java.awt.*; abstract class Text { protected TextApplet tA; protected Text(TextApplet tApplet) { tA = tApplet; } abstract public void draw(Graphics g); } class PlainText extends Text { protected PlainText(TextApplet tApplet) { super(tApplet); } public void draw(Graphics g) { g.setColor(tA.getColor()); g.setFont(new Font("Sans-serif", Font.PLAIN, 12)); g.drawString(tA.getText(), 20, 20); } } class CodeText extends Text { protected CodeText(TextApplet tApplet) { super(tApplet); } public void draw(Graphics g) { g.setColor(tA.getColor()); g.setFont(new Font("Monospaced", Font.PLAIN, 12)); g.drawString(tA.getText(), 20, 20); } } public class TextApplet extends java.applet.Applet { protected Text text; protected String textVal; protected Color color; public String getText() { return textVal; } public Color getColor() { return color; } public void init() { textVal = getParameter("text"); String textStyle = getParameter("style"); String textColor = getParameter("color"); if (textStyle == "code") text = new CodeText(this); else text = new PlainText(this); if (textColor == "red") color = Color.RED; else if (textColor == "blue") color = Color.BLUE; else color = Color.BLACK; } public void paint(Graphics g) { text.draw(g); 10 } } The Text class is more complicated than it should be (there is too much coupling between the Text and TextApplet classes). By getting rid of the reference to a TextApplet object in the Text class and setting the colour in the paint() method, one could turn the Text class into an interface and simplify the strategy classes considerably. 5.1 Rewrite the Text and PlainText classes to do what is described above. (6) 5.2 Explain the consequent changes that are necessary to the TextApplet class. (4) 5.3 Write an additional strategy class called FancyText (to go with your simplified strategy classes) to allow fancy text to be displayed for the value "fancy" provided for the style parameter. It should use the font Font ("Serif", Font.ITALIC, 12). (3) 5.4 Explain what changes are necessary to the TextApplet class for this. (2)

0 Answers   TCS,


What is the map interface in java programming?

0 Answers  


Categories