wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Grade 12 Computers Quiz

Total questions: 30

Worksheet time: 11mins

Name
Class
Date
1.

What is the difference between an abstract class and an interface in Java?

a)

An abstract class cannot have any methods, while an interface can have both abstract and non-abstract methods.

b)

An abstract class and an interface are the same thing in Java.

c)

The main difference is that an abstract class can have both abstract and non-abstract methods, while an interface can only have abstract methods.

d)

An abstract class can only have abstract methods, while an interface can have both abstract and non-abstract methods.

2.

Explain the concept of method overloading in Java.

a)

Method overloading is a feature that allows a method to have different return types.

b)

Method overloading allows a class to have more than one method having the same name and same parameter list.

c)

Method overloading allows a class to have more than one method having the same name if their parameter lists are different.

d)

Method overloading is not supported in Java.

3.

What is the purpose of JSP in web development?

a)

To manage databases in web development.

b)

To create dynamic web pages with Java technology.

c)

To design static web pages with HTML technology.

d)

To create interactive web pages with Python technology.

4.

How do you include a JSP page in another JSP page?

a)

<% import file='includedPage.jsp' %>

b)

<% include file='includedPage.jsp' %>

c)

<%@ import file='includedPage.jsp' %>

d)

<%@ include file="includedPage.jsp" %>

5.

What are the key features of the Spring framework?

a)

Java, C++, and Python

b)

Frontend, Backend, and Fullstack development

c)

Object-Oriented Programming (OOP), Functional Programming, and Procedural Programming

d)

Inversion of Control (IoC), Aspect-Oriented Programming (AOP), and Spring MVC are key features of the Spring framework.

6.

Explain the concept of dependency injection in Spring.

a)

Dependency injection is a design pattern in which a class receives its dependencies from external sources rather than creating them itself.

b)

Dependency injection is a design pattern in which a class only receives dependencies from internal sources.

c)

Dependency injection is a design pattern in which a class creates its own dependencies.

d)

Dependency injection is a design pattern in which a class does not use any dependencies.

7.

Write a SQL query to retrieve all the records from a table named 'employees'.

a)

DISPLAY employees_data;

b)

SELECT * FROM employees;

c)

SHOW employees;

d)

SELECT * FROM employee_table;

8.

What is the purpose of the Junit testing framework?

a)

Perform system testing for Java applications

b)

Perform unit testing for Java applications

c)

Perform integration testing for Java applications

d)

Perform regression testing for Java applications

9.

Explain the concept of test fixtures in Junit.

a)

Test fixtures in JUnit are a set of preconditions that are used to ensure that the test environment is set up properly before the actual test is executed.

b)

Test fixtures in JUnit are used to clean up the test environment after the test is executed.

c)

Test fixtures in JUnit are not necessary and can be skipped for most tests.

d)

Test fixtures in JUnit are only used for debugging purposes.

10.

How do you integrate Junit with Jenkins for continuous integration?

a)

Install JUnit plugin in Jenkins

b)

Configure Jenkins to run JUnit tests as part of the build process

c)

Use a separate tool to integrate JUnit with Jenkins

d)

Manually run JUnit tests after the build process

11.

What is the command to initialize Git on the current repository ?

a)

start git

b)

initialize git

c)

git start

d)

git init

12.

Git commit history is automatically deleted ?

a)

Commit history is never automatically deleted.  

b)

Every Month

c)

Every Year

d)

Every two weeks

13.

What is the command to commit the staged changes for the Git repository?

a)

git stage

b)

git push

c)

git commit

d)

git save

14.

In Git, a branch is :

a)

Nothing, it is a nonsense word.

b)

A secret part of Git config.

c)

A small wooden stick you can use to type commands.

d)

A separate version of the main repository.

15.

What is the command to view the history of commits for the repository ?

a)

git log

b)

git --full-log

c)

git history

d)

git commits

16.

What is the command to delete the branch "new-email" ?

a)

git delete new-email

b)

git delete branch new-email

c)

git branch -d new-email 

d)

git gone new-email

17.

Git Pull is a combination of :

a)

branch and checkout

b)

fetch and merge 

c)

add and commit

d)

fetch and checkout

18.

Which SQL statement is used to extract data from a database ?

a)

SHOW

b)

EXTRACT

c)

SELECT

d)

OPEN

19.

how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?

a)

SELECT * FROM Persons WHERE FirstName<>'Peter'

b)

SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter'

c)

SELECT [all] FROM Persons WHERE FirstName='Peter'

d)

SELECT * FROM Persons WHERE FirstName='Peter' 

20.

Which SQL statement is used to return only different values ?

a)

SELECT DISTINCT

b)

SELECT SINGLE

c)

SELECT DIFFERENT

d)

SELECT UNIQUE

21.

Which SQL keyword is used to sort the result-set ?

a)

ORDER

b)

SORT BY

c)

ORDER BY

d)

SORT BY

22.

What is a Jenkins job ?

a)

A unit of work in Jenkins

b)

A task that needs to be done manually

c)

A type of software bug

d)

A physical location in a workspace

23.

How can Jenkins help in automating the testing process ?

a)

By writing test cases manually

b)

By printing test cases on paper

c)

By executing test cases automatically

d)

By ignoring the testing phase

24.

What is a Jenkins pipeline ?

a)

A type of road

b)

A graphical user interface

c)

A sequence of automated software delivery stages

d)

A data storage structure

25.

Which of the following is a version control system often integrated with Jenkins ?

a)

Linux

b)

SVN

c)

Maven

d)

Git

26.

Lequel des énoncés suivants est correct concernant le Framework Spring ?

a)

Le Framework Spring est une solution lourde(heavy-weight solution).

b)

Le Framework Spring est une solution légère(light-weight solution).

c)

Les deux 1 et 2 sont vrais

d)

Aucune de ces réponses n’est vraie.

27.

Le langage d’expressions (ou Expression Language) fait partie de Core Container dans le Framework Spring?

(a)  

28.

Le Controller dans Spring est une_______________?

a)

Classe Abstraite

b)

Classe finale

c)

Classe concrète

d)

Interface

29.

Les Beans définis dans le framework spring sont par défaut (a)   ?

30.

Lequel des énoncés suivants est vrai ?

a)

BeanFactory hérite de ApplicationContext

b)

ApplicationContext hérite de BeanFactory

c)

BeanFactory implémente ApplicationContext

d)

ApplicationContext implémente le BeanFactory