InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What are the differences between JVM vs JIT vs JDK vs JRE? |
||||||||||||||||
Answer»
|
|||||||||||||||||
| 2. |
What factors should a J2EE application possess for operating in a global economy? |
|
Answer» Following are the FACTORS that a J2EE application should POSSESS to OPERATE globally:
|
|
| 3. |
What do you understand by JSF? |
|
Answer» JSF stands for Java SERVER Faces which is a web framework that is INTENDED for simplifying the development process for user interfaces. It is a STANDARDIZED display technology for Java-based web applications. It is based on MVC (Model-View-Controller) pattern and provides reusable UI components. |
|
| 4. |
What constitutes web components? |
|
Answer» Java Servlets and Java Server Pages (JSP) components together constitute web components. Java Servlets dynamically process requests and responses. JSP pages are USED for EXECUTING servlets that ALLOW a natural approach to creating static CONTENT. |
|
| 5. |
What do you understand by ORM? |
|
Answer» ORM stands for Object-Relational Mapping that transforms objects of Java class to tables in relational databases and vice versa using metadata describing the mapping between the database and the objects. This is represented as shown in the below image: Consider an example where we have an Employee class having employeeId, firstName, lastName, contactNo as attributes. Consider we also have an Employee table that has ID, FNAME, LNAME and CONTACT_NO as COLUMNS. If we want to send DATA from our Java application and save it in the database, we cannot do it straightforwardly by simply saving the Java objects in the database directly. We need some SORT of a mapper that maps the Java objects to the records that are compatible to be saved in the database table. This is where ORM comes into the picture. ORM helps in this transformation while writing data to the database as described in the below image: The database records cannot be directly CONSUMED by the Java applications as Java only deals with objects. ORM again plays a major role in the transformation of database records to Java objects. |
|
| 6. |
What is the architecture model of Struts? |
|
Answer» Strut is a combination of JSP, Java Servlets, MESSAGES and CUSTOM tags that together form an application development framework for developing enterprise-level applications. It is based on MVC (Model-View-Controller) architecture.
|
|
| 7. |
What are the J2EE applets? Why can we use it? |
|
Answer» Applets are J2EE client components that are written in JAVA and are EXECUTED in a web browser or a VARIETY of other devices which supports the applet programming model. They are used for providing interactive features to web apps and help in providing small, PORTABLE embedded Java programs in HTML pages which will be run AUTOMATICALLY when we view the pages. |
|
| 8. |
What is an EJB? How can you use it in J2EE? |
|
Answer» EJB or Enterprise Java Beans is one of the most important parts of the J2EE platform that helps to develop enterprise-level multi-tiered applications and deploy them by keeping in mind performance, scalability and robustness. EJBs can be used when we want to achieve the following:
|
|
| 9. |
Why do we have JDBC and JNDI in J2EE? How are they different from each other? |
|
Answer» JDBC or Java DATABASE Connectivity PROVIDES guidelines and APIs for connecting databases from different vendors like MySQL, Oracle, PostgreSQL etc for GETTING data. JNDI (Java Naming and DIRECTORY Interface) helps in providing logical structure to retrieve a resource from the database, EJB beans, messaging queues etc without knowing the actual host address or port. A resource can be registered with JNDI and then those registered application components can be accessed using the JNDI NAME. |
|
| 10. |
What do you understand by build file? |
|
Answer» A build FILE is used for automating VARIOUS steps involved in software development. ALONG with this, the build file also specifies libraries and their versions that need to be included. It also includes the TYPE of optimizations required for the project. Whenever the project size increases, build provides a STANDARD way to build the project. |
|
| 11. |
How is multi-tier client-server architectural model advantageous? |
|
Answer» Multi-tier client-server architectural model CONSISTS of various components KNOWN as tiers that interact with each other. The below image represents the three-tier application model which has client/presentation tier, business logic tier and the database tier which interact with each other to process a request and send a response: In the multi-tier system, we have the following advantages:
|
|
| 12. |
How are PATH and CLASSPATH different from each other in terms of J2EE? |
|
Answer» PATH and CLASSPATH are key environmental variables used by Java platforms.
|
|
| 13. |
How is JDK different from JIT? |
|
Answer» JDK (Java Development Kit) is a cross-platformed software development environment offering various collections of LIBRARIES and tools required for developing Java applications and applets. It also consists of JRE that provides tools and libraries which aids in byte code execution. JDK is needed for writing and running programs in Java. Whereas JIT STANDS for Just In Time Compiler which is a module inside JVM (which is inside JRE). JIT compiler is USED for compiling some parts of byte code having similar functionality at the same time to machine code for optimising the compilation time and performance. |
|
| 14. |
What are the various components of J2EE application architecture? |
|
Answer» J2EE is made up of 3 main components (tiers) - Client tier, Middle tier, ENTERPRISE data tier as shown in the below image:
|
|
| 15. |
What are some of the technologies provided by the J2EE platform? |
|
Answer» Some of the important technologies provided by J2EE are:
|
|
| 16. |
What are the main advantages of J2EE? |
|
Answer» Following are the advantages of the J2EE platform:
Due to all the above benefits packed in one technology, it helps the developers to reduce the TCO (Total Cost of Ownership) and also focus more on actual business logic IMPLEMENTATION. |
|
| 17. |
What is J2EE? |
|
Answer» J2EE or Java Enterprise Edition is a Java-based PLATFORM that is a combination of services protocols and APIS (Application Programming Interfaces) that provides capabilities to develop multi-tier, SECURE, stable and FAST enterprise-level applications. J2EE provides web, enterprise, web service and VARIOUS other specifications for developing enterprise-level web applications. |
|