Core Java Interview Questions Part 20/ Applets/ Generic Types/ Java database connectivity.

Hello Friends, In this Blog Post I am going to let you know about core java interview questions related to Applets, Generic Types, and Java database connectivity.

Core java interview questions cover all the important questions of the topics mentioned above.

These core java interview questions are a great help to remember all the important highlights and important topics from each java chapter.

These interview questions will surely help to understand a few very confusing concepts in java.

What is an applet?

An applet represents java byte code embedded in a web page.

What is the applet life cycle?

An applet is born with the init() method and starts functioning with the start() method. To stop the applet, the stop() method is called, and to terminate the applet completely from memory, the destroy () method is called.

Once the applet is terminated, we should reload the HTML page again to get the applet to start once again from the init() method. This cyclic way of executing the method is called the applet life cycle.

Where is the applet executed?

Applets are executed by a program called applet engine which is similar to a virtual machine that exists inside the web browser on the client-side.

What is HotJava?

HotJava is the first applet-enabled browser developed in java to support the running of applets.

Which tag is used to embed an applet into an HTML page?

<APPLET> tag is used to insert an applet into an HTML page.

What is the generic type?

A generic type represents a class or an interface that is type-safe. It can act on any data type.

What is erasure?

Creating a non-generic version of a generic type by the java compiler is called erasure.

What is JDBC?

JDBC(Java database connectivity) is an API that is useful to write java programs to connect to any database, retrieve the data from the database, and utilize the data in a java program.

What is a database driver?

A database driver is a set of classes and interfaces, written according to JDBC API to communicate with a database.

How can you register a driver?

To register a database driver, we can follow one of the 4 options.

By creating an object to driver class.

By sending driver class object to DriverManager.registerDrive() method.

By sending the driver class name to class.forName() method.

By using System class getProperty() method.

What is DSN?

A data source name (DSN) is a name given to the database to identify it in the java program. The DSN is linked with the actual location of the database.

What is ResultSet?

ResultSet is an object that contains the results (rows) of executing a SQL statement on a database.

Will the performance of a JDBC program depend on the driver?

Yes, each driver offers a different performance.

What is parsing?

Parsing represents checking the syntax and grammar of statements as a whole and also word by word.

What is the difference between a statement and a prepared statement?

Statement parses a statement before its execution on the database. This parsing is done every time the statement is executed, hence it may take more time when the same statement gets executed repeatedly.

PreparedStatements conduct parsing only once when the same statement is executed repeatedly and hence it gives better performance.

What are stored procedures?

A stored procedure represents a set of statements that are stored and executed at a database server, sending the result to the client.

What is the use of a callable statement?

The callable statement is useful to call stored procedures and functions which run at a database server and get the result into the client.

What is a scrollable result set?

A scrollable result set represents a result set object was moving in forward and backward directions are possible. It also provides methods to update the rows in the result set.

What is BLOB?

A binary large object(BLOB) is a SQL data type that represents binary data to be stored in a database. BLOB helps us to store images in a database.

What is CLOB?

Character large object(CLOB) is a SQL data type that represents larger volumes of text data. CLOB helps to store text in a database.

So this was all about the Core java interview questions on this topic.

These Core java interview questions could be a great help in your college viva, academic study, and any job interview.

In the case of any queries, you can write to us at [email protected] we will get back to you ASAP.

Hope! you would have enjoyed this post.

Please feel free to give your important feedback in the comment section below.

Have a great time!


I am a blogger by passion, a software engineer by profession, a singer by consideration and rest of things that I do is for my destination.