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.
Advantages
- 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
- 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.
Servlet
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
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
- Translation
- Compilation
- Classloading
- Instance creation
- Initialization
- Request processing
- Destroy
MVC
MVC stands for model view and controller. It is a design pattern that separates the business logic presentation logic and data.
Advance Java MCQs
What is the RMI server responsible for?
Identify the Microsoft solution for providing dynamic web content.
In which file database table configuration is stored?
RMI stands for __________
TCP, FTP, SMTP, Telnet are examples of?
The total JDBC product components in Java software provides is ___________
The total number of techniques used in session tracking is ________
Total JDBC drivers available is _____________
Total TCP/IP ports reserved for specific protocol is._______
What are the major components of the JDBC?
What decides the priority of the thread?
What is built on top of socket programming?
What is the difference between servlet and JSP?
Identify the method which is used to start a server thread.
What is the total number of bits in a single IP address?
What is the total number of ResultSet available with the JDBC 2.0 core API?
Where can BLOB, CLOB, ARRAY, and REF type columns be updated?
Which driver is known as the thin driver in JDBC?
Which is responsible for getting a connection to the database?
Which of the following examples of application servers?
Which of the following option leads to the portability and security of Java?
Which of the following requires fewer resources?
Which of the following tags does the JSP page contain?
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?
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.
Among the following methods which of the following returns proxy object.
Among the following options choose the one which shows the advantage of using the JDBC connection pool.
Among the following protocols are used for splitting and sending packets to an address across a network.
Among the following which attribute is used to specify the class name of the bean.
Among the following which contains date information.
What is the purpose of the finally block in a Java try-catch-finally construct?
Which of the following access modifiers provides the widest scope of visibility for a class member in Java?
Among the following which is a type of multitasking?
Among the following which is not a directive?
Among the following which method is used to know the host of an URL?
Choose the instance variable of class httpd among the following.
Total ways to perform exception handling in JSP is ________
Choose whether true or false: The JDBC API is what allows access to a data source from a java middle tier.
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: The web server is used for loading the init() method of the servlet.
For resolving Facelet views, which of the following is configured.
Full form of JDBC is __________
How constructor can be used for a servlet?
Identify among the following which follows the connectionless service.
Identify the class used for connection-less socket programming.
Identify the HTTP request method which is non-idempotent.
Identify the method of the JDBC process among the following options.
Identify the method which is used to find the URL from the cache of httpd.