Worksheetsمحمد 3
Total questions: 27
Worksheet time: 14mins
Name
Class
Date
1.
Which of the following statement is NOT true?
a)
A. TCP is a reliable but slow.
b)
B. UDP is not reliable but fast.
c)
C. File Transfer Protocol (FTP) is a standard Internet protocol for transmitting files between computers on the Internet over TCP/IP connections.
d)
D. In HTTP, all communication between two computers are encrypted
2.
Which class or interface defines the wait(), notify(),and notifyAll() methods?
a)
A. Object
b)
B. Class
c)
C. Runnable
d)
D. Thread
3.
One of the following classes is used for connection-less socket programming?
a)
A. Datagram Socket
b)
B. Datagram Packet
c)
C. Both A and B
d)
D. None of the above
4.
Which will contain the body of the thread?
a)
A. main();
b)
B. stop();
c)
C. start();
d)
D. run();
5.
start() method is called to
a)
A. Invoke the thread, before the run() method is executed.
b)
B. Execute the thread which is in 'ready to run' state
c)
C. Transit the thread from 'running' to 'ready to run' state
d)
D. None of them
6.
To connect to a server running on the same machine with the client, which of the following cannot be used for the hostname?
a)
A. “localhost”
b)
B. "127.0.0.1"
c)
C. InetAddress.getLocalHost(),
d)
D. "127.0.0.0"
7.
Which is used to send and receive electronic mail.
a)
A. Simple Mail Transition Protocol
b)
B. Simple Mail Transfer Protocol
c)
C. Simple Mail Terminal Protocol
d)
D. Simple Mail Transport Protocol
8.
Assume the following method is properly synchronized and called from a thread A on an object B: wait(2000); After calling this method, when will the thread A become a candidate to get another turn at the CPU?
a)
A. After thread A is notified, or after two seconds.
b)
B. Two seconds after thread A is notified.
c)
C. After the lock on B is released, or after two seconds.
d)
D. Two seconds after lock B is released.
9.
One of is following is Default port for HTTP:
a)
A. 25
b)
B. 80
c)
C. 21
d)
D. 23
10.
Which of the following will directly stop the execution of a Thread?
a)
A. notify()
b)
B. notifyall()
c)
C. wait()
d)
D. exits synchronized code
11.
TCP/IP is known as:
a)
A. Network Hardware
b)
B. Network Software
c)
C. Both a and b
d)
D. Protocol
12.
______is the Central Computer powerful than other computers in the network.
a)
A. Server
b)
B. Hub
c)
C. Client
d)
D. Switch
13.
One of the following the java.net Net Address class represents.
a)
A. Socket
b)
B. Protocol
c)
C. IP Address
d)
D. MAC Address
14.
How many bits are in a single IP address?
a)
A. 8
b)
B.16
c)
C. 32
d)
D. 64
15.
WAN stands for?
a)
A. Wide Access Net
b)
B. Wide Access Network
c)
C. Wide Area Network
16.
Which of these methods is used to write() into a file?
a)
A. put()
b)
B. putFile()
c)
C. write()
d)
D. writeFile()
17.
The computer network is a
a)
A. Network computer with guided media
b)
B. Network computer without fiber optic
c)
C. None of them
d)
D. Both of them
18.
Which of these is a protocol for breaking and sending packets to an address across a
network?
a)
A. TCP/IP
b)
B. DNS
c)
C. Socket
d)
D. Proxy Server
19.
Which of these exception is thrown by close() and read() methods?
a)
A. IOException
b)
B. FileException
c)
C. FileNotFoundException
d)
D. FileInputOutputException
20.
A deadloack in Java is
a)
A. A situation where two threads waiting to get terminated.
b)
B. A situation where a low priority thread waiting to acquire an I/O resource but other high priority threads never relinquish the resources.
c)
C. A situation where a thread is waiting to acquire an object lock that another thread holds, and this second thread is waiting for an object lock that the first thread holds.
21.
Which of this class contains the methods used to write in a file?
a)
A. FileStream
b)
B. FileInputStream
c)
C. BUfferedOutputStream
d)
D. FileBufferStream
22.
Which of this package contains classes and interfaces for networking?
a)
A. java.io
b)
B. java.util
c)
C. java.net
d)
D. javax.swing
23.
To create an InputStream on a socket, say s, which of the following statement is necessary?
a)
A. InputStream in = new InputStream(s);
b)
B. InputStream in = s.getInputStream();
c)
C. InputStream in = s.obtainInputStream();
d)
D. InputStream in = s.getStream();
24.
One of the following applications of the Client and Server Model?
a)
A. Email
b)
B. Network Printing
c)
C. World Wide Web
d)
D. All of these
25.
Three or more than 3 computers share a link in ________ connection
a)
A. Point to point
b)
B. Unipoint
c)
C. Multipoint
d)
D. All above
26.
A communication pathway that transfers data from one point to another is called
a)
A. Medium
b)
B. Node
c)
C. Link
d)
D. Topology
27.
What is multithreaded programming?
a)
A. It is a process in which two different processes run simultaneously
b)
B. It’s a process in which a single process can access information from many sourcesB. It’s a process in which a single process can access information from many sources
c)
C. It is a process in which two or more parts of same process run simultaneously
d)
D. It is a process in which many different process are able to access same information
100 %
