wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

JAVA Developer

Total questions: 30

Worksheet time: 30mins

Name
Class
Date
1.

1. Which of the following is not a core interface of Hibernate?

a)

a) Configuration

b)

b) Criteria

c)

c) SessionManagement

d)

d) Session

2.

2. Which of the following methods hits database always?

a)

a) load()

b)

b) loadDatabase()

c)

c) getDatabase()

d)

d) get()

3.

3. Which of the following is not an advantage of Hibernate Criteria API?

a)

a) Allows to use aggregate functions

b)

b) Cannot order the result set

c)

c) Allows to fetch only selected columns of result

d)

d) Can add conditions while fetching results

4.

4.Which ways are used by the Log4j and Logback frameworks in hibernate framework to support logging?

a)

a. By log4j.xml file

b)

b. By log4j.properties

c)

c. Both A & B

d)

d. None of the above

5.

5.We need to specify @Inheritance(strategy=InheritanceType.JOINED) in the parent class and @PrimaryKeyJoinColumn annotation in the subclasses.

a)

a. True

b)

b. False

6.

6.Abbreviate the term HQL?

a)

a. Hibernate Queue Language

b)

b. Hibernate Query Language

c)

c. Hipher Query Language

d)

d. None of the above

7.

7.Which of the following is NOT a mapping association used in Hibernate?

a)

A. Many-to-Many Association

b)

B. One-to-Many Associationcorrect

c)

C. One-to-One Association

d)

D. None

8.

8.Which of these simplifies an Object Relational Mapping tool?

a)

A. Data creation

b)

B. Data manipulation

c)

C. Data access

d)

D. All mentioned above

9.

What is Spring Framework used for?

a)

Creating graphical user interfaces

b)

Managing database schemas

c)

Building and managing enterprise applications

d)

Generating test data

10.

What is the core container module in the Spring Framework?

a)

Spring Boot

b)

Spring Web

c)

Spring MVC

d)

Spring IoC

11.

What is the purpose of Spring Boot?

a)

To provide a lightweight container for Spring applications

b)

To simplify the configuration and deployment of Spring applications

c)

To enhance the performance of Spring applications

d)

To replace the Spring Framework entirely

12.

Which embedded web server is supported by default in Spring Boot?

a)

Tomcat

b)

GlassFish

c)

WildFly

d)

Jetty

13.

What is the purpose of the @Autowired annotation in Spring?

a)

It defines a new bean

b)

It injects dependencies automatically

c)

It configures database connections

d)

It specifies URL patterns

14.

Which file is commonly used for configuring Spring beans in XML format?

a)

applicationContext.xml

b)

spring-beans.xml

c)

beans-config.xml

d)

spring-context.xml

15.

Which Spring module provides support for transaction management?

a)

Spring AOP

b)

Spring Data

c)

Spring Transaction

d)

Spring ORM

16.

What is the primary role of the Spring Boot Starter modules?

a)

To create Spring beans

b)

To manage application properties

c)

To configure the database

d)

To simplify dependency management

17.

What does the term "Inversion of Control" (IoC) refer to in Spring?

a)

A control statement in programming logic

b)

A design pattern for creating classes

c)

The process of controlling hardware devices

d)

The management of object dependencies by a container

18.

Which of the following is a microframework built on top of the Spring Framework?

a)

Spring Data

b)

Spring Boot

c)

Spring Security

d)

Spring Cloud

19.
What is Swing in Java?
a)
Framework
b)
GUI
c)
Compiler
d)
Database
20.
What is an example of Swing?
a)
Component
b)
Physical
c)
Programming
d)
Swing
21.
Which Attribute is used to specify the bean declared?
a)
factory-bean
b)
scope
c)
getBean
d)
declareBean
22.
Which are the IoC containers in Spring?
a)
BeanFactory, ApplicationContext
b)
BeanFactory, ApplicationContext, IocContextFactory
c)
BeanFactory, BeanContext, IocContextFactory
d)
BeanFactory, ApplicationContext, BeanContext
23.
Alternate way of initialization method is:-
a)
init-method attribute
b)
afterPropertiesSet
c)
destroy-method attribute
d)
none of the mentioned
24.
Alternate way of destruction method is:-
a)
init-method attribute
b)
afterPropertiesSet
c)
destroy-method attribute
d)
none of the mentioned
25.
Language used to set various kinds of join points
a)
AspectJ pointcut language
b)
Java pointcut language
c)
XML pointcut language
d)
None of the mentioned
26.
Spring AOP only supports method execution join points for the beans in its IoC container
a)
True
b)
False
27.
What are all IDE can be used for Spring boot Development
a)
Intelli J
b)
Eclipse
c)
Spring Tool Suite(STS)
d)
All the Above.
28.
What is default Web server used in Spring boot Application?
a)
Jetty
b)
Apache Tomcat
c)
JSP
29.
Spring supports web flows by:-
a)
Java
b)
XML
c)
All of the mentioned
d)
None of the mentioned
30.
What is an ORM?
a)
Object Relational Mapper
b)
Alternative to JDBC