• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 13 pages
Exam (elaborations)

COP 3252 Final Test Complete Solution

Document preview thumbnail
Preview 2 out of 13 pages

COP 3252 Final Test Complete Solution ...

Content preview

COP 3252 Final Test Complete Solution


Which statement is false? Normally, an applet __________ - ANSWER can read files on
any server that can be reached over the network

Using a URL as an argument to the __________ method of interface AppletContext causes
the browser in which an applet is executing to display the URL - ANSWER
showDocument

Which statement is false? - ANSWER With datagram sockets a process establishes a
connection to another process

Once the ServerSocket is created, the server can listen indefinitely (or block) for an
attempt by a client to connect. This is accomplished with a call to the ServerSocket
method __________ - ANSWER accept

A(n) _________ is thrown when a String that is not in proper URL format is passed to a
URL constructor - ANSWER MalformedURLException

If an ObjectInputStream is used to read information from the server, an __________ is
generated when the client attempts to read a value from a stream on which
end-of-stream is detected - ANSWER EOFException

A(n) __________ is thrown when a server address indicated by a client cannot be
resolved - ANSWER UnknownHostException

A JEditorPane generates HyperlinkEvents only if it is __________ - ANSWER uneditable

__________ sockets and the __________ protocol are more desirable for the vast majority
of Java programmers. - ANSWER Stream, TCP

UDP is a connection-oriented protocol - ANSWER False

Which statement is false? - ANSWER A non-generic class cannot be derived from a
generic class

Which statement is false? - ANSWER A List cannot contain duplicate elements

One generic Stack class could be the basis for creating many Stack classes, e.g.,
Stack<Double>, Stack<Integer> and Stack<Employee>. These classes are known as
__________. - ANSWER parameterized classes

When the compiler translates a generic method into Java bytecodes, it uses __________
to replace the type parameters with actual types. - ANSWER erasure

When a generic class is instantiated without specifying a type argument, it is said to
have a __________. - ANSWER raw type

, A(n) __________ allows a program to walk through the collection and remove elements
from the collection. - ANSWER Iterator

The collections framework algorithms are __________, i.e., each of these algorithms can
operate on objects that offer given interfaces without concern to the underlying
implementations. - ANSWER polymorphic

__________ enable programmers to specify, with a single method declaration, a set of
related methods. - ANSWER Generic methods

Collections method sort that accepts a List as an argument sorts the elements of a List,
which must implement the __________ interface. - ANSWER Comparable

The classes and interfaces which comprise the collections framework are members of
package ________. - ANSWER java.util

An uncaught exception: - ANSWER is an exception that occurs for which there are no
matching catch clauses.

When a __________ method or block is running on an object, the object is locked so no
other such method can run on that object at the same time. - ANSWER synchronized

The preferred means of creating multithreaded Java applications is by implementing the
________ interface. An object of a class that implements this interface represents a task
to perform. - ANSWER Runnable



A new thread begins its life cycle by transitioning to the __________ state. - ANSWER new

To catch an exception, the code that might throw the exception must be enclosed in a -
ANSWER try block

Which of the following statements about try blocks is true? - ANSWER The try block
should contain statements that may throw an exception

In the catch block below, what is arithmeticException?

catch ( ArithmeticException arithmeticException )

{

System.err.printf( arithmeticException );

} // end catch - ANSWER The name of catch block's exception parameter

The main method executes in the ________ thread of execution. - ANSWER main

Which of the following is not true of ExecutorService? - ANSWER It is an object that can
be run in a separate thread

Document information

Uploaded on
January 13, 2025
Number of pages
13
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$11.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Evergreenview
4.8
(5)
Sold
19
Followers
1
Items
3302
Last sold
1 week ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions