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.
| 251. |
What is the use of snapshot in Maven? |
|
Answer» In Maven, SNAPSHOTS are used for ACTIVE projects. You can entirely rely on the snapshot RELEASE when you have SOFTWARE development projects are active. Here, Maven attempt to download the snapshots, when the user runs the build, from a repository. |
|
| 252. |
How do you check if you have Maven installed? |
|
Answer» Follow the below-written STEPS to check the PROPER installation of MAVEN:-
Learn more about Best Maven Interview Questions with us. |
|
| 253. |
What is Maven's order of inheritance? |
|
Answer» It is ONE of the most common Maven INTERVIEW Question and most accessible to ANSWER and remember. The order of Maven inheritance is as below-
|
|
| 254. |
What is Maven build life cycle? |
|
Answer» Maven BUILD life cycle is the SEQUENCE of the STEPS for the execution of the goals and tasks of any Maven project. The categories under Maven build life cycle are default, clean and site. Here, the default lifecycle handles the deployment of the project and WHEREAS, the clean life cycle considers the CLEANING of the project. The task of handling the creation of the documentation of the project is dealt with by site lifecycle. |
|
| 255. |
Explain the difference between Apache Ant and Maven? |
||||||||||||
Answer»
|
|||||||||||||
| 256. |
What are the types of Maven repository? |
|
Answer» There are THREE TYPES of MAVEN REPOSITORY, namely-
|
|
| 257. |
What is the use of Maven repository? |
|
Answer» It is the directory of the JAR files which are packaged and that too with some metadata which are POM files. These are the files used for DOWNLOADING DEPENDENCIES of your dependencies TILL the time when all of them are DOWNLOADED. These are put into the local machine. |
|
| 258. |
What does Maven install do? |
|
Answer» Maven INSTALL is used for framing a PROJECT configuration-based DEPENDENCY tree such as pom.xml. On an MVN install, framing project is DONE on all the subjects under downloads/compiles and super pom.xml for all the required components in the directory |
|
| 259. |
What is the purpose of Maven? |
Answer»
|
|
| 260. |
What is POM in maven? |
|
Answer» POM, PROJECT Object Model is the fundamental work unit in Maven. Basically, it is an XML file CONTAINING details of the configuration and project INFORMATION with the help of Maven for building the project. The best thing is the AVAILABILITY of the default values for the PROJECTS. |
|
| 261. |
What are the advantages of Maven? |
Answer»
|
|
| 262. |
What do you mean by Maven and why it is used? |
|
Answer» A maven is a tool used for software project management and comprehension. Most of the times it is used with projects or software developed in Java, and other PROGRAMMING languages such as RUBY and C#. This software project management tool is used for- |
|
| 263. |
List some of the Design Patterns used in the Spring Framework? |
|
Answer» Here are some of the DESIGN PATTERNS USED in SPRING:
|
|
| 264. |
What do you mean by ViewResolver in Spring? |
|
Answer» Like all MVC frameworks that provide a WAY to work with views, SPRING offers the same feature through the VIEW resolvers. The view resolvers enable the developers to render MODELS in the browser without the need to implement a specific view METHOD. In ViewResolver, you can map view names with actual views. Some of the view resolvers in the Spring framework are InternalResourceViewResolver, ResourceBundleViewResolver, and XmlViewResolver. |
|
| 265. |
Explain the use of Spring Security? |
|
Answer» Spring Security is one of the security modules in the Spring FRAMEWORK. BASED on the Java SE/Java EE framework, it provides authentication and authorization to web and ENTERPRISE applications. This powerful and highly customizable framework is the de-facto standard for securing all spring-based apps. 19. What do you mean by @controller annotation in spring?@Controller annotation is a specialization of @Component class that ALLOWS the implementation class to be detected through classpath scanning. @Controller annotation annotates Classic controllers. @Controller annotation is used in MVC framework in combination with @RequestMapping annotation in request handling. |
|
| 266. |
What do you mean by DAO in Spring? |
|
Answer» DAO or Data Access Object is a design pattern where DAO is an object, which provides an abstract INTERFACE to a DATABASE or some other type of persistence mechanisms. This support AIMS at working with data access technologies like Hibernate and JPA EASY and CONSISTENT. |
|
| 267. |
Explain the difference between Singleton and prototype bean in spring? |
||||||||||||
Answer»
|
|||||||||||||
| 268. |
What do you mean by @qualifier in spring? |
|
Answer» The @Qualifier annotation in SPRING is used in CASES where the developer has created more beans of the same type but only wants to wire one of them with the said PROPERTY. The @Qualifier annotation can be used with @Autowired for removing the confusion of SPECIFYING and identifying the exact bean to be wired. |
|
| 269. |
Explain the difference between @autowired and @inject? |
||||||||||||
Answer»
|
|||||||||||||
| 270. |
What do you mean by configuration annotation in spring? |
|
Answer» Configuration annotation is a part of the spring framework. It indicates that class includes @BEAN definition METHODS. This helps the container process the class and GENERATE BEANS for using in the application and generating definitions and service requests at the runtime. |
|
| 271. |
What do you mean by Autowiring in spring? |
|
Answer» The Autowiring FEATURE enables developers to inject DEPENDENCIES in the object implicitly. Autowiring internally USES the setter or constructor INJECTION. This feature cannot be used for injecting primitive or string values, and it only WORKS with reference. |
|
| 272. |
What are setter injection and constructor injection in spring? |
|
Answer» Setter Injection is a type of dependency injection (DI) in which the framework uses a setter METHOD to inject dependent objects into the client. The CONTAINER first calls the no-argument constructor and later it calls the setters. Such setter-based injections can work even if dependencies are injected using the constructor. Constructor injection uses a constructor for injecting dependencies on Spring-managed BEANS. The constructor DI is achieved when the container initiates a CLASS constructor with arguments, each argument REPRESENTING dependencies on other classes. |
|
| 273. |
What do you mean by BeanFactory in spring? |
| Answer» | |
| 274. |
What is BeanFactory and ApplicationContext in Spring? |
|
Answer» BeanFactory is the container that instantiates, manages and configures beans. Beans usually collaborate with each another and SHARE dependencies, which are shown in the data used by the BeanFactory. The APPLICATIONCONTEXT is the INTERFACE within a SPRING application for offering configuration information to the application. |
|
| 275. |
Explain the different types of spring container? |
|
Answer» Spring provides 2 types of containers:
|
|
| 276. |
What do you mean by AOP? |
|
Answer» Aspect-oriented PROGRAMMING or AOP is a programming approach that allows different properties of a program to DETERMINE how they are compiled into a program. You can use AOP with object-oriented programming or OOP. |
|
| 277. |
List the modules used in Spring framework? |
|
Answer» Spring framework has 7 modules.
|
|
| 278. |
What do you mean by dependency injection and how does it work? |
|
Answer» Dependency Injection or DI is a DESIGN pattern that implements inversion or change of control for resolving dependencies. It is a process through which OBJECTS define their dependencies. Transferring the task of creating objects to someone ELSE and using the dependency is CALLED dependency injection. It can be done in 2 ways: constructor-based DI and setter-based DI. |
|
| 279. |
Explain the difference between IOC and Di? |
|||||||||
Answer»
|
||||||||||
| 280. |
Explain the benefits of Spring framework? |
|
Answer» Following are the benefits of using Spring Framework:
|
|
| 281. |
What is spring? Explain |
|
Answer» Spring is ONE of the most POPULAR open source app development frameworks for enterprise-class Java. Spring is lightweight in terms of size. Some of its core features can be used to develop any Java application, and there are in-built EXTENSIONS on top of the Java EE platform for BUILDING web applications. Spring FRAMEWORK is called a one-stop platform for building enterprise-level Java applications. |
|
| 282. |
How many types of ResultSet are there in JDBC? |
|
Answer» There are THREE TYPES of RESULTSET in JDBC, namely
|
|
| 283. |
What is Addbatch JDBC? |
| Answer» | |
| 284. |
What is two-phase commit in the database? |
|
Answer» It is a standardized protocol ASSURING the implementation of a database commit in such a situation where the commit operation has to be broken into 2 parts. Saving the changes in the database is CALLED commit whereas, rollback is undoing the changes. In the first phase of the commit, data is written into the data records by the servers needing commit data to the log. In the next step, it begins after getting the successful MESSAGE from the previous phase, and the particular object, i.e., the coordinator, SENDS a signal to each SERVER with the instructions of the commit. 20. What are the steps required to execute a query in JDBC? |
|
| 285. |
What is JDBC connection? |
| Answer» | |
| 286. |
Explain the locking system in JDBC & its types? |
|
Answer» The LOCKS are the preventive SOFTWARE mechanism which the other users cannot USE the DATA resource. Types of locks are there-
|
|
| 287. |
What is connection pooling and why it is used? |
|
Answer» Connection pooling is a maintained CACHE of DATABASE connections which are kept to be USED for the future use of the database requests arise. It HELPS in improving the performance of the commands to be executed in the database. |
|
| 288. |
Which package is used for JDBC application? |
|
Answer» PACKAGE Javax.sql is USED for JDBC APPLICATION. |
|
| 289. |
List the common JDBC exceptions ? |
|
Answer» There are SEVERAL JDBC EXCEPTIONS such as
|
|
| 290. |
What is Savepoint in JDBC? |
|
Answer» It is the point to which the TRANSACTION gets ROLLED back without affecting the preceding work. The method which is used for setting a SAVEPOINT object WITHIN the CURRENT transaction is Connection.setSavepoint(). |
|
| 291. |
What is transaction processing in JDBC? |
|
Answer» In JDBC, CARRYING out of all the sets of actions in ONE go is known as a TRANSACTION. It is an atomic action in which either all are carried out, or none of them is carried out. Java Transaction API |
|
| 292. |
What is the Execute method in Java? |
|
Answer» The method is used for EXECUTING a query. It returns true if the ResultSet object is the query return. It returns ONE ResultSet object. ExampleInt m = st.executeUpdate(SQL); If (m==1) System.out.println (“inserted successfully: “+sql); Else System.out.println (“insertion failed”); |
|
| 293. |
Explain the difference between resultset and rowset in JDBC |
| Answer» | |
| 294. |
What is a rollback in JDBC? |
|
Answer» It is used for rolling BACK the transactions or committing them explicitly. It is LIKE UNDOING the changes. An action can be rolled back to the same SAVEPOINT more than once. |
|
| 295. |
What is the use of the statement in JDBC? |
|
Answer» The two statements in JDBC, such as PreparedStatement, and CallableStatement are USED for DEFINING the properties and the METHODS for letting the user send PL/SQL or SQL commands. Also, RECEIVING the data from the database and determining the methods for bridging the data type differences become comfortable with the statement interfaces. |
|
| 296. |
Explain the Steps in writing a Java program using JDBC? |
| Answer» | |
| 297. |
What are the different types of JDBC drivers? |
| Answer» | |
| 298. |
Explain the necessary steps to connect to the database in Java? |
Answer»
|
|
| 299. |
Why do we use JDBC in Java? |
|
Answer» This JAVA SE TECHNOLOGY is used for building connecting java application with the database. It gets automatically installed with JDK software and used for the communication of Java application to the database in the platform and database INDEPENDENT MANNER. |
|
| 300. |
Explain some new features available in JDBC 4.0? |
Answer»
|
|