a. Only one subclasses | ||
b. Only one superclass | ||
c. State and behavior from only one other class | ||
d. More than one subclass and superclass |
a. Bundle | ||
b. Function | ||
c. Method | ||
d. Object |
a. Behavior | ||
b. State | ||
c. Both A and B | ||
d. None of the above |
a. Code reuse | ||
b. Information-hiding | ||
c. Modularity | ||
d. All of the above |
a. Class | ||
b. Object | ||
c. Program | ||
d. All of the above |
a. Behavior | ||
b. Field | ||
c. State | ||
d. All of the above |
a. Internal state | ||
b. Behavior | ||
c. Method | ||
d. All of the above |
a. Class | ||
b. Interface | ||
c. Namespace | ||
d. Relationship |
a. Implementing an interface formally describes the behavior it provides. | ||
b. Methods defined by the interface do not have to appear in its source code to compile. | ||
c. The interface does not form its "contract" between the class and the outside world until the compiled program is run. | ||
d. All of the above |
a. A commonly used state from another class | ||
b. A rarely used behavior from a number of other classes | ||
c. Only one subclass | ||
d. All of the above |
a. Another thread may change or invalidate a result before the originating thread completes its sequence. | ||
b. A race condition only exists when counting is in process. | ||
c. The thread involves a sequence of actions, but each action is independent of a previous action. | ||
d. All of the above |
a. At any given time the number of active threads may only be a fraction of the total number of threads. | ||
b. The number of active threads should be comparable to the number of available processors. | ||
c. Network operations may choose to block a thread that handles communication with a client. | ||
d. All of the above |
a. A thread pool is a large collection of threads available for tasks to be performed. | ||
b. A new task is assigned to a thread in the pool rather than creating a new thread. | ||
c. Thread pools are used when a small number of tasks are to be performed. | ||
d. All of the above |
a. A thread pool is used to make a new thread for each client connection. | ||
b. A task that runs a significant amount of time may cause other clients to wait. | ||
c. The server program processes connection requests from many clients. | ||
d. All of the above |
a. Public char peek() | ||
b. Public boolean eof() | ||
c. Public String getln() | ||
d. All of the above |
a. DataInputStream | ||
b. PrintWriter | ||
c. Scanner | ||
d. All of the above |
a. Byte | ||
b. Character | ||
c. Network | ||
d. Public |
a. Binary data | ||
b. Letters in a word | ||
c. Tokens | ||
d. All of the above |
a. A stream is an abstraction for input/output. | ||
b. A stream is a specific destination for output such as a network connection. | ||
c. A stream allows the programmer to specify the source file. | ||
d. All of the above |
a. They suffer from the fragility that is often seen in character data. | ||
b. The data in object streams is not easily available to programs written in other languages. | ||
c. The objects can only be transmitted over a network connection from one Java program to another. | ||
d. All of the above |
a. Avoid writing the same object more than once. | ||
b. Call the stream's reset() method before writing the object to the stream. | ||
c. Use only string data. | ||
d. All of the above |
a. They suffer from the fragility that is often seen in binary data. | ||
b. The object streams are byte streams. | ||
c. The objects are represented in machine-readable form for efficiency. | ||
d. All of the above |
a. These streams are optimized to avoid writing the same object more than once. | ||
b. If the object has been modified, the new data will not be written. | ||
c. When an object is encountered for a second time, only a reference to the first occurrence is written. | ||
d. All of the above |
a. Retrieve the URLConnection object. | ||
b. Set output capability on the URLConnection. | ||
c. Write to the output stream. | ||
d. All of the above |
a. Client-server | ||
b. Port | ||
c. Socket | ||
d. All of the above |
a. To create a new instance of the interface | ||
b. To determine a virtual connection's IP address | ||
c. To set constructor to public | ||
d. All of the above |
a. Create a socket | ||
b. Connect/access multiple NIC's | ||
c. Join a multicast group | ||
d. All of the above |
a. The data can be transformed to the order needed by the receiving URL. | ||
b. The data must be received in the order in which it was sent. | ||
c. The protocol allows networks to detect corrupt files and return them to the sender. | ||
d. All of the above |
a. getPort | ||
b. URL | ||
c. URLConnection | ||
d. All of the above |
a. It is another name for a TCP packet. | ||
b. It requires a reliable flow of data between two computers. | ||
c. It relies on the UDP protocol. | ||
d. All of the above |
a. Cookie | ||
b. Form | ||
c. Search | ||
d. All of the above |
a. To create the default cookie handler | ||
b. To determine where session cookies will be stored | ||
c. To set cookie policy for the session | ||
d. All of the above |
a. DOM | ||
b. JAXP | ||
c. SAX | ||
d. XSLT |
a. DOM | ||
b. JAXP | ||
c. SAX | ||
d. XSLT |
a. DOM | ||
b. JAXP | ||
c. SAX | ||
d. XSLT |
a. Both contain a beginning tag <>. | ||
b. Both contain an ending tag </>. | ||
c. Both can be nested. | ||
d. All of the above |
a. DOM | ||
b. SAX | ||
c. XSL | ||
d. All of the above |
a. The URL contains a socket address for a webpage on a network. | ||
b. The URL object defines the web owner. | ||
c. The URL object has an openConnection() method to access the information that it represents. | ||
d. All of the above |
a. SAXParserFactory | ||
b. SAXReader | ||
c. SAXParser | ||
d. DTDHandler |
a. SAXParserFactory | ||
b. SAXReader | ||
c. SAXParser | ||
d. DefaultHandler |
a. SAXParserFactory | ||
b. SAXReader | ||
c. SAXParser | ||
d. EntityResolver |
a. With coding in XML or HTML, always use utf-8. | ||
b. With coding in XML or HTML, start with the declaration statement <? | ||
c. With coding in XML or HTML, use any text editor to create the file | ||
d. All of the above |
a. It identifies the file as an XML document. | ||
b. It is the first processing instruction in the program. | ||
c. It starts with the characters <? | ||
d. All of the above |
a. Automatic copying of text | ||
b. Processing instructions | ||
c. Skipping comments | ||
d. All of the above |
a. Copying attribute nodes | ||
b. Section Title | ||
c. Skipping comments | ||
d. None of the above |
a. It is the normalization of an XSLT transformation. | ||
b. The output of one transformation becomes the input of the next. | ||
c. The final output is always XML. | ||
d. All of the above |
a. JAXP leverages the parser routines. | ||
b. JAXP provides control over the presentation of XML data. | ||
c. JAXP prevents streaming of events by building object representations. | ||
d. All of the above |
a. The URL contains a socket address for a webpage on a network. | ||
b. The URL object defines the web owner. | ||
c. The URL object has an openConnection() method to access the information that it represents. | ||
d. All of the above |
a. DTDHandler | ||
b. EntityResolver | ||
c. SAXParser | ||
d. All of the above |
a. A try statement with a catch clause to handle the exception. | ||
b. The method definition declares that calling the method might throw the exception. | ||
c. The method heading includes a throws clause. | ||
d. All of the above |
a. DTDHandler | ||
b. EntityResolver | ||
c. ErrorHandler | ||
d. All of the above |
a. File | ||
b. OutputStream | ||
c. Writer | ||
d. All of the above |
a. getInput Stream operation | ||
b. getOutput Stream operation | ||
c. openConnection method | ||
d. All of the above |
a. An exception is generated. | ||
b. The program that called the subroutine attempts to resolve the problem. | ||
c. The program abends. | ||
d. All of the above |
a. Each method in the interface must declare java.rmi.RemoteException in its throws clause. | ||
b. The remote interface must be private. | ||
c. The remote interface must have "package access." | ||
d. All of the above |
a. The thrown object must belong to the class Throwable (or any of its subclasses). | ||
b. The thrown object carries information about the exception. | ||
c. The Throwable class represents all possible objects that can be thrown. | ||
d. All of the above |
a. A condition could occur in a subroutine that would cause an error. | ||
b. Your code includes logic to check for correct values being input. | ||
c. Robustness has been included in your code. | ||
d. All of the above |
a. SAAJ | ||
b. SOAP | ||
c. XPATH | ||
d. XSLT |
a. Use network connection operations | ||
b. Pretend the remote object is local. | ||
c. Use rmic tool to create stubs and skeletons. | ||
d. All of the above |
a. Any object passed into a remote object must implement Serializable. | ||
b. Any object argument from a remote object must implement Remote. | ||
c. Include stubs and skeletons to perform deserialization. | ||
d. All of the above |
a. X | ||
b. Y | ||
c. IdentifyMyParts | ||
d. All of the above |
a. X | ||
b. Y | ||
c. IdentifyMyParts | ||
d. All of the above |
a. 3 | ||
b. 5 | ||
c. 6 | ||
d. None of the Above |
a. Behavior | ||
b. Implements | ||
c. Method | ||
d. Plugs |
a. To organize unrelated classes and interfaces | ||
b. To organize a limited number of classes and interfaces | ||
c. To provide application infrastructure | ||
d. All of the above |
a. 2000 | ||
b. Does not compile. | ||
c. Does not run. | ||
d. Generates a "null exception" message. |
a. Students array | ||
b. Jack Jones string | ||
c. Both students and Jack Jones | ||
d. None of the above |
a. It needs a Method. | ||
b. It is a valid interface. | ||
c. It needs a Class. | ||
d. All of the above |
a. Both the increment() method and getValue() have been correctly synchronized. | ||
b. Neither synchronization is necessary. | ||
c. Only the increment() method should be synchronized to prevent interruption by another thread. | ||
d. Only the getValue() should be synchronized to prevent racing. |
a. Use a ConcurrentLinkedQueue for the task queue. | ||
b. The Daemon is not necessary as it keeps the program from ending. | ||
c. Remove the exception when using the LinkedBlockingQueue for the task queue. | ||
d. This program works fine, especially if a thread pool is to be used. |
a. By wrapping PrintWriter with File Writer, you get the ability to use File Writer methods. | ||
b. The FileWriter is a stream object that knows how to send individual characters to a printfile. | ||
c. Wrapping the FileWriter adds capabilities to the file output stream but still sends the data to the same destination. | ||
d. All of the above |
a. By wrapping the File Writer in a PrintWriter, you get the ability to write other data types to the file using the PrintWriter's print() and println() methods. | ||
b. The PrintWriter class is being used as a "wrapper" for the FileWriter class. | ||
c. Wrapping the FileWriter adds capabilities to the file output stream but still sends the data to the same destination. | ||
d. All of the above |
a. getFile | ||
b. getPath | ||
c. getQuery | ||
d. All of the above |
a. Create Cookie Handler | ||
b. Create Cookie Policy | ||
c. Create Cookie Manager and set CookieHandler | ||
d. All of the above |
a. HTML | ||
b. XML | ||
c. Both HTML and XML | ||
d. All of the above |
a. Add stylesheet for Docbook. | ||
b. Correct ending of Sect1. | ||
c. Remove period from Para. | ||
d. It is correct as written. |
a. methodOne | ||
b. methodTwo | ||
c. methodFour | ||
d. All of the above |
a. methodOne | ||
b. methodTwo | ||
c. methodFour | ||
d. All of the above |
a. Deprecate the implementation of open. | ||
b. Suppress the warning. | ||
c. Ignore the warning, as it is not an error. | ||
d. Both A and B |
a. The thrown object must belong to the class Catchable (or any of its subclasses). | ||
b. The thrown object carries information about the exception. | ||
c. The Catchable class represents all possible objects that can be thrown. | ||
d. All of the above |