0% found this document useful (0 votes)
13 views4 pages

Servlet and JDBC Questions

Uploaded by

glvyshnavi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views4 pages

Servlet and JDBC Questions

Uploaded by

glvyshnavi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

What is the drawback of java?

• Performance:

• Slower than C/C++: Java applications tend to be slower and consume more memory
compared to applications written in lower-level languages like C or C++ because Java
programs run on the Java Virtual Machine (JVM) which adds an additional layer of
abstraction.

• Memory Consumption:

• High Memory Usage: Java programs typically consume more memory because of
the JVM and garbage collection process. This can be a concern for applications that
need to run on devices with limited resources.

• Complexity:

• Verbose Syntax: Java’s syntax can be verbose and requires a lot of boilerplate code,
which can make the code less readable and harder to maintain compared to more
concise languages like Python or Ruby.

What is the drawback of the file handling?

• Complexity and Error-Prone:

• Manual Management: Handling files manually can be complex and error-prone.


Programmers need to ensure that files are opened, read from, written to, and closed
properly, which increases the chance of errors such as forgetting to close a file or
mishandling file paths.

• Performance Issues:

• I/O Speed: File I/O operations can be slower compared to other types of data
operations, such as memory access, especially when dealing with large files or
numerous small file operations.
• Blocking Operations: File handling operations can block the execution of a program
while waiting for the I/O to complete, which can negatively impact performance,
particularly in applications requiring real-time processing.

• Concurrency Problems:

• File Locking: Concurrent access to files by multiple processes or threads can lead to
issues like race conditions, data corruption, or the need for complex file locking
mechanisms to ensure data integrity.

• Data Breaches: Improper handling of sensitive files can lead to security


vulnerabilities, such as unauthorized access or data breaches. Ensuring proper file •
What is JDbc?

JDBC (Java Database Connectivity) is an API (Application Programming Interface) in Java that defines how a
client may access a database. It provides methods for querying and updating data in a database and is oriented
towards relational databases.

What are the steps for JDBC?

1) Import the packages 2)Load and register driver 3) Establish connection 4) create the statement and execute
the query 5) process the resultset 6)close all the jdbc connections

What are the components used from java.sql.package?

statement,PreparedStatement

What is a driver?

In the context of JDBC (Java Database Connectivity), a driver is a software component that facilitates
the interaction between Java applications and databases

What are the difference between DRIVER(I) AND Driver(c)?

What is a connection?How to establish a connection in JDBC?

How many types getConnection() methods are present in JDBC?

What is the returntype of getConnection() method?

What is a databaseURL?Explain

What is a Statement ?

What are the types of Statement in JDBC?

What is the returntype of CreateStatement() method?

What is the returntype of prepareStatement() method?

What are the methods used to execute a statement?What are the returntypes?

Why is it necessary to close the connection?

Servlet questions

What is a application? What are different types of applications?

What is standalone Application?

What is an webbased application?

What are the types of webbased applications?Explain

Explain all the web architecture?

What is an API?
What is an Server?

What are the different types of servers?Explain

What is an URL?

What is the components of URL?

What is an servlet?

What is an servlet interface?

What are the unimplemented methods in Servlet interface?Explain

What is an Generic Servlet?

What are the steps to configure a Static request?

What are the steps to configure a dynamic request?

What is the method used to receive the inputs from the view files?

What is the returntype of getParameter() method?

What are servletrequest and servletresponse?

What is printwriter?

How can we create an object of printWriter?

What is httpservlet?

What is the difference b/w httpservlet and genericservlet?

What are methods present in httpservlet?

What is jsp?

what is the difference between html and jsp?

What are the tags used in jsp?explain

What is requestdispatcher?

What is the method used to create an object of requestdispatcher?

What are methods in request dispatcher used to carry the data to nextlayer?

What is use of sendredirect() method?

Explain webservlet annotation?

Expalin lifecycle of an servlet with an diagram?

You might also like