Hello Friends, In this Blog Post I am going to let you know about core java interview questions related to Applets, Generic Types, Java database connectivity.
Core java interview questions covers all the important questions of the topics mentioned above.
These core java interview questions is 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 applet life cycle?
An applet is born with the init() method and starts functioning with 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 start once again from the init() method. This cyclic way of executing the method is called the applet life cycle.
Where are 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 at 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 a HTML page?
<APPLET> tag is used to insert an applet into HTML page.
What is 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 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 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 on 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?
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 statement 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 executed, hence it may take more time when the same statement gets executed repeatedly.
PreparedStatements conduct parsing only once when the same statement executed repeatedly and hence it gives better performance.
What are stored procedure?
A stored procedure represents a set of statements that is stored and executed at a database server, sending the result to the client.
What is the use of callablestatement?
Callable statement useful to call stored procedures and functions which run at a database server and get the result into the client.
What is scrollable result set?
A scrollable result set represents a result set object was moving in forward and backward direction is 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 into a database. BLOB helps us to store images into 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 into a database.
So this was all about the Core java interview questions in 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 about.
Please feel free to give your important feedbacks in the comment section below.
Have a great time!