NEW
Font size
WorksheetsWeb Dev Quizz 1
Total questions: 15
Worksheet time: 7mins
What is the difference between == and .equals() when comparing two objects in Java?
== compares object references;
.equals() compares object values
== compares object values;
.equals() compares object references
== and .equals() are used interchangeably in Java
== and .equals() both compare object references
Which Java collection is best suited for maintaining a unique set of elements with no duplicates?
ArrayList
LinkedList
HashSet
TreeMap
What HTTP status code is returned when a resource is successfully created on the server?
200
201
204
400
Explain the concept of microservices architecture and how it differs from a monolithic architecture.
Microservices divide an application into smaller, independent services; Monolithic is a single, large application
Microservices are used only in mobile app development; Monolithic is for web applications
Microservices are a type of database; Monolithic is a type of server
Microservices are used in mainframe computing; Monolithic is used in cloud computing
What is a checked exception in Java, and when should you use them in your code?
Checked exceptions are always thrown at runtime; use them for critical errors
Checked exceptions must be caught or declared; use them for recoverable errors
Checked exceptions are never thrown; they are used for documentation purposes
Checked exceptions are handled by the JVM automatically; use them for all exceptions
Briefly describe the difference between authentication and authorization in web security.
Authentication verifies a user's identity; authorization defines what actions they can perform
Authentication controls access to web pages; authorization validates user input
Authentication encrypts data; authorization decrypts data
Authentication and authorization are the same concepts in web security
What is multithreading, and how can it improve the performance of a Java application?
Multithreading is the same as multiprocessing; it doesn't improve performance
Multithreading allows an application to execute multiple threads concurrently, improving responsiveness and resource utilization
Multithreading can only be used in distributed systems
Multithreading reduces the performance of a Java application
JSP ( Java Server Pages ) runs on a _(1)_ and respond to requests from _(2)_
(1) client, (2) servers
(1) device, (2) users
(1) browser, (2) databases
(1) server, (2) clients
Name two popular front-end JavaScript frameworks/libraries used for building single-page applications (SPAs).
Angular and React
Java & C#
JQuery & Bootstrap
Python & Ruby
What is the purpose of API documentation, and name a commonly used format for documenting RESTful APIs.
API documentation provides information about the API's author;
Swagger is a commonly used format
API documentation is used for testing APIs;
XML is a commonly used format
API documentation helps developers understand how to use an API;
Swagger and OpenAPI are commonly used formats
API documentation is not necessary for RESTful APIs
What is an SQL JOIN, and why is it useful in database queries?
SQL JOIN is used to create a new database table; it's not used in queries
SQL JOIN combines rows from two or more tables based on a related column; it's useful for retrieving data from multiple tables
SQL JOIN is used for creating primary keys in databases
SQL JOIN is used to update records in a table
Which keyword is used to declare a variable that can be accessed without creating an instance of the class?
Final
Static
Private
Void
What is the default port for HTTP communication?
80
443
8080
8000
Which CSS property is used to change the text color of an HTML element?
background-color
font-color
text-color
color
In object-oriented programming, what is the concept of inheritance?
It refers to creating a new instance of a class
It involves using interfaces to define class behavior
It allows a new class to inherit properties and behaviors from an existing class
It is used to implement polymorphism in Java
