You are on page 1of 4

Viva Voce Questions 1. What is JDBC?

JDBC is Java application programming interface that allows the Java programmers to access database management system from Java code. It was developed by JavaSoft, a subsidiary of Sun What will Class.forName do while loading drivers? When you have loaded a driver, it is available for making a connection with a DBMS. It is used to create an instance of a driver and register it with the DriverManager. List the Advantages of JDBC. Provide Existing Enterprise Data Businesses can continue to use their installed databases and access information even if it is stored on different database management systems. No Installation A pure JDBC technology-based driver does not require special installation. Database Connection Identified by URL The JDBC API includes a way to identify and connect to a data source, using a DataSource object. This makes code even more portable and easier to maintain. What is resultSet? Resultset contains results of the SQL query. How can you retrieve data from the ResultSet? 1. Create a result set containing all data from my_tab stmt = con.createStatement() rs = stmt.executeQuery("SELECT * FROM my_tab") 2. Fetch each row from the result set rs.next() 3. Get the data from the row using the column index rs.getString(1) 4. Get the data from the row using the column name rs.getString(columnName) What is the username and password of mysql according to your project? Username: root Password: What are the SQL statements used in JDBC connectivity? 1): Select 2): Insert 3): Update 4): Delete What is the use of java.sql.*? This package provides the APIs for accessing and processing data which is stored in the database especially relational database by using the java programming language What is JDBC Driver Manager? DriverManager class to create a connection to a database server, you need to load a JDBC driver that knows how to create a connection to that database server.

2.

3.

4. 5.

6. 7.

8.

9.

10.

What is try catch block?


The try block encloses the statements that might raise an exception within it and defines the scope of the exception handlers associated with it. The catch block is used as an exception-handler. You enclose the code that you want to monitor inside a try block to handle a run-time error. A try block must have at least one catch block that follows it immediately. try { //statements that cause the exception } catch(ExceptionName obj) { //error handling code } What is the name of object of exception handler in your project? e What does rs.next() returns? A Bollean value True/False What is rs.next()? Calling rs.next() moves the pointer downits a pointer which starts before the first tuple in your result set. What is SQLException?

11. 12. 13. 14. 15. 16.

An exception that provides information on a database access error or other errors.


What is ClassNotFound?

Thrown when an application tries to load in a class through its string name using: The forName method in class Class.
What is an exception?

An exception is an event that occurs during the execution of a program that disrupts the normal flow of instructions.
17. Diagram of JDBC connectivity?

18.

19.

What is the difference between net beans and java beans? Netbeans is an Integrated Development Environment (IDE) for the Java programming language. A JavaBean is just a Java class with a specific formatting. Difference between Swing and Awt? AWT are heavy-weight componenets. Swings are light-weight components. Hence swing works faster than AWT.

20.

21.

22.

What is static in java? Static means one per class, not one for each object no matter how many instance of a class might exist. This means that you can use them without creating an instance of a class. You can't change a static method into an instance method in a subclass. Define Net Beans. NetBeans refers to both a platform framework for Java desktop applications, and an integrated development environment (IDE) for developing with Java, JavaScript, C, C++,and others. What is an abstract method? An abstract method is a method that is declared without an implementation (without braces, and followed by a semicolon), like this: abstract void moveTo(double deltaX, double deltaY);

List of topics: JVM Java AWT Controls and Swing Controls ByteCode Platform Independence Class Object Enabled and Visible Property EcoChar Property Features of OOPs Inheritance Types of Inheritance Method/Function Return function in a method Function Overloading Function Overriding Joins Types of Joins Primary Key and Unique Key Foreign Key Types of Constraints Types of SQL commands: DDl, DML and TCL Commit, Rollback and Savepoint DBMS and Database Features of Java and MYSQL Variable and Constant Declaring Constant Loops: Entry control and Exit control CheckBox and RadioButton Foucs

ER diagram Entity, Attributes, Relationship or mapping cardinality Network and Networking Hub and Switch Types of Topologies LAN, MAN, WAN and PAN Modem Firewall ListBox and ComboBox Adding Values in Listbox and ComboBox Comments in Java Default Java Package: java.lang Conditional Operator/Ternary Operator(?:) Use of break and default Prefix and Postfix Operator AND, OR and NOT operator Use of equals and equalsIgnoreCase TextArea and Append ( ) Method Signature Actual and Formal parameters Constructors Instance Members (Object Members) and Static Members (Class Members) Call by value and call by reference this keyword Primitive, Composite and User defined Data Type Public, Private and Protected Declaring object of a class Library Functions Java.sql.*,java.lang.*,java.util.*,java.math.* String and StringBuffer objects JOptionPane OL and UL tag Table tags Insert image and Link Difference between HTML and XML Order by, Group by and Having clause Front end and Back end JTable and JMenu Selection and Iterative Construct Java use Unicode Unicode and ASCII code

You might also like