Advance Java MCQ
Java, originally evolved from the Oak language, was born in early 1996 with its major version as Java 1 or JDK 1.0. Java was initially designed and developed by Sir James Gosling at Sun Microsystems. Java 8 or JDK 8.0 is one of the major releases of the Java programming language in 2014.
Java is divided into two parts
- Core Java(J3SE)
- Advanced Java(JEE)
The Core Java consists of all the fundamentals of Java programming language such as data types, functions, loops, threads, etc.
Why is Advanced Java used?
- Advance java simplifies the complexity of building an n-tier application.
- JEE application server and containers provide Framework services.
- It provides the concept of client-server architecture.
- There are many Advanced Java frameworks such as spring Hibernate states that helped secure transaction-based web applications.
- There are many web application servers such as Apache Tomcat and glassfish
- it provides various services of API and protocols
- AWT stands for abstract window Toolkit.
- It is a collection of classes and interfaces
- AWTpackage contains a large number of classes which help to include various graphical components in the Java program
- it provides a platform Independent and device-independent interface to develop graphic programs that run on all platforms including Windows, Mac OS, and Unix.
Servlets in Java programs that run on the java-enabled web server or application server. They are used to handle the request obtained from the webserver, process the request and produce the response and then send the response back to the server.
Properties of Servlet
- It works on the server-side
- It is capable of handling Complex requests obtained from a webserver
- It came to solve the problem due to common Gateway interface implementation
Types of servlets
- Generic servlet
- HTTP servlet
JSP is used to create web applications but it is an extension to servlet because it provides more functionality than servlet such as expression language, JSTL.
- A JSP page consists of HTML tags and JSP tags.
- It is easier to maintain
- More functionality is available in JSP
- Fast development
The life cycle of a JSP
- Instance creation
- Request processing
MVC stands for model view and controller. It is a design pattern that separates the business logic presentation logic and data.
Advance Java MCQs
Among the following options choose the one which shows the advantage of using the JDBC connection pool.
Among the following which contains date information.
Identify the method of the JDBC process among the following options.
The total JDBC product components in Java software provides is ___________
Total JDBC drivers available is _____________
Where can BLOB, CLOB, ARRAY, and REF type columns be updated?
Which driver is known as the thin driver in JDBC?
TCP, FTP, SMTP, Telnet are examples of?
Identify the class used for connection-less socket programming.
Total TCP/IP ports reserved for specific protocol is._______
What is the total number of bits in a single IP address?
Which of the following option leads to the portability and security of Java?
What are the major components of the JDBC?
Which is responsible for getting a connection to the database?
In which file database table configuration is stored?
How constructor can be used for a servlet?
Identify the method which is used to start a server thread.
Identify the method which is used to find the URL from the cache of httpd.
Choose the instance variable of class httpd among the following.
Among the following which method is used to know the host of an URL?
Which of the following ways is used to communicate from an applet to servlet?
Which tag is used to execute Java source code in JSP?
Which of the following access modifiers provides the widest scope of visibility for a class member in Java?
What is the purpose of the finally block in a Java try-catch-finally construct?
Total ways to perform exception handling in JSP is ________
Full form of JDBC is __________
Which of the following requires fewer resources?
What decides the priority of the thread?
Among the following which is a type of multitasking?
What is the RMI server responsible for?
RMI stands for __________
What is built on top of socket programming?
Identify among the following which follows the connectionless service.
Among the following protocols are used for splitting and sending packets to an address across a network.
What is the total number of ResultSet available with the JDBC 2.0 core API?
Choose whether true or false: The ResultsSet.next method is used to move the next row of the ResultSet, making the current row
Choose whether true or false: JDBC is a Java API that is used to connect and execute queries to the database.
Among the following identify the packages which represent interfaces and classes for servlet API.
Identify the HTTP request method which is non-idempotent.
Which of the following examples of application servers?
The total number of techniques used in session tracking is ________
Identify the Microsoft solution for providing dynamic web content.
What is the difference between servlet and JSP?
Among the following which is not a directive?
Choose whether true or false: The JDBC API is what allows access to a data source from a java middle tier.
For resolving Facelet views, which of the following is configured.
Among the following methods which of the following returns proxy object.
Among the following which attribute is used to specify the class name of the bean.
Choose whether true or false: The web server is used for loading the init() method of the servlet.