java finallllll

¡Supera tus tareas y exámenes ahora con Quizwiz!

Which of the following methods is used to receive a datagram?

. receive()

Which of the following strings can be used for the host name to establish a socket connection with the server running on the same machine with the client?

127.0.0.1 b. InetAddress.getLocalHost() c. localhost d. All of the above.-answer

Servlets embed Java code directly into HTML pages

False

In which layer do socket applications belong?

Application Layer

Which of the following IP address classes do multicasting addresses belong to

Class D

JSPs embed HTML inside Java code.

False

Which of the following address pairs is known as socket address?

IP address

To obtain an InputStream on a socket sock, use __________.

InputStream in = sock.getInputStream();

What is the full form of IPC?

Inter-Process Communication

Servlets

Read the explicit data sent by the clients (browsers) Read the implicit HTTP request data sent by the clients. Process the data and generate the results. All answers above are correct-answer

Which of the following is used by a client to establish a socket connection with the server?

Socket s = new Socket(ServerName, port);

Which of the following statements is used by the server to listen for a connection request from a client?

Socket s = serverSocket.accept();

What happens when a server uses a port to bind an object, but the port is not available?

The exception java.net.BindException occurs.

What is the full form of TCP?

Transmission Control Protocol

A web container is responsible for mapping ____ to a particular servlet

URL

What is the full form of UDP?

User Datagram Protocol

Correct access rights to servlets are managed by the _____

Web container

Common object communication patterns are called

behavioral patterns

Which of the following methods is used to assign a socket address to a socket?

bind()

__ pattern is used when we need to decouple an abstraction from its implementation so that the two can vary independently.

bridge

.___ pattern separates the construction of a complex object from its representation.

builder

Imagine a scenario when a given task to be accomplished need not be performed by a single object. It can be handled by multiple objects, each contributing to the task completion in a specific and limited way. The common design pattern to use is

chain-of-responsibility

When examining several classes that have Execute() method, the most likely implemented design pattern is

command

Common object instantiation patterns are called

creational patterns

Design pattern problem

explains the problem and its context.

___ pattern provides a simple decision making class that returns one of several possible subclasses of an abstract base class.

factory

Concurrent client requests for a servlet are

handled by separate threads

Which of these packages contains classes and interfaces for networking?

java.net

Servlet API is partially specified in the _____ package

javax.servlet.http

When you need to implement an 'undo' or a 'rollback' operation, the standard design pattern is

memento

___ pattern manages and creates instances of a class that can be used interchangeably.

object pool

This pattern defines one-to-many dependency between objects so that when one object changes its state all the others are notified about the change.

observer

Java servlet handles the business logic as a _____ process

server-side

All servlets implement the ____ interface.

servlet

___ pattern provides a single global point of access to one instance.

singleton

Which of the following is used to get an InetAddress object on a socket object sock.

sock.getInetAddress();

Design patterns are ______

solutions to general software development problems

Common object composition patterns are called

structural patterns

The MVC design pattern decouples these major components allowing for efficient code reuse and parallel development.

user interface - business rules - data store

When you need to implement a double dispatch (the operation depends on types of the sender and the receiver), the standard design pattern is

visitor


Conjuntos de estudio relacionados

Hormones of the Duodenum pg. 915

View Set

New RMA Credit Risk Certification

View Set

World Geo First 25 US State Capitals Quiz 9/27/23

View Set

NUR-227 PEDS TEST 2 (Immunizations (Sherpath))

View Set