NEW
Font size
S
M
L
XL
Worksheetsmo khaled
Total questions: 75
Worksheet time: 38mins
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
28.
Best description for uploading information?
a)
Sorting data on a disk drive
b)
Sorting data on a hard drive
c)
Receiving information from a host computer
d)
Sending information to a host computer
29.
Which of the following method call is valid to obtain the server's hostname?
a)
host()
b)
getHost()
c)
hostName()
d)
getHostName()
30.
Deadlock is a situation when thread is waiting for other thread to release acquired object.
a)
TRUE
b)
FALSE
c)
Can be true or false
d)
Not always true
31.
FTP stands for…..?
a)
Form transmission protocol
b)
File transmission protocol
c)
Form transfer protocol
d)
File transfer protocol
32.
Which of the following statement is TRUE
a)
With stream sockets there is no need to establish any connection and data flows between the processes are as continuous streams.
b)
Stream sockets are said to provide a connection-less service and UDP protocol is used.
c)
Datagram sockets are said to provide a connection-oriented service and TCP protocol is used.
d)
With datagram sockets there is no need to establish any connection and data flows between the processes are as packets.
33.
Select the most common internet protocol?
a)
TCP/IP
b)
NetBEUI
c)
HTML
d)
IPX/SPX
34.
LAN stands for?
a)
Local Area Net
b)
Local Array Net
c)
Local Array Network
d)
Local Area Network
35.
What is the name of the method used to start a thread execution?
a)
run();
b)
init();
c)
start();
d)
resume();
36.
Select the method that should be overridden to provide thread's behavior when Thread class is extended:
a)
start()
b)
resume()
c)
behavior()
d)
run()
37.
The process of sending data from a local computer to a remote computer is called
a)
Download
b)
Editing
c)
Upload
d)
E-mail
38.
Abbreviation of DNS is
a)
Disk Name System
b)
Domain Name Signal
c)
Domain Number System
d)
Domain Name System
39.
In the following URL, identify the protocol identifier? https://gtu.ac.in:8080/course.php
a)
http
b)
gtu.ac.in
c)
//gtu.ac.in:80/course.php
d)
8080
40.
The most common way for accessing to the internet is
a)
Point-to-point computer
b)
Virtual provider or computer
c)
Dumb terminal
d)
Provider or host computer
41.
The computer connected to the internet must have?
a)
have a unique IP address
b)
be an IBM PC
c)
have a modern connection
d)
be internet compatible
42.
Which method must be defined by a class implementing the java.lang.Runnable interface?
a)
public void run()
b)
void runAll()
c)
void run(int priority)
d)
public void start()
43.
Which of these are types of multitasking?
a)
Process based
b)
Thread based
c)
Process and Thread based
d)
None of the mentioned
44.
select the protocol that provide helps to transfer files between computers
a)
HTP
b)
HTTP
c)
FTTP
d)
FTP
45.
_______is the Machine that places the request to access the data
a)
Client Machine
b)
Server Machine
c)
Request Machine
d)
None of these
46.
Which of this class is used to encapsulate IP address and DNS?
a)
Datagram Packet
b)
URL
c)
InetAddress
d)
ContentHandler
47.
Data share between the two computer through
a)
Library
b)
Integrated system
c)
Grouping
d)
Network
48.
Which of these values is returned by read() method is end of file (EOF) is encountered?
a)
0
b)
1
c)
-1
d)
Null
49.
______is the default port of SMTP.
a)
25
b)
70
c)
80
d)
85
50.
Multipoint topology is a …..topology?
a)
Ring
b)
Star
c)
Bus
d)
None
51.
Which of these methods of Thread class is used to Suspend a thread for a period of time?
a)
stop()
b)
sleep()
c)
terminate()
d)
suspend()
52.
The abbreviation of FTP?
a)
File transfer protocol
b)
File transmission protocol
c)
File transfer program
d)
File transfer protection
53.
The following block of code creates a Thread using a Runnable target:Which of the following classes can be used to create the target, so that the preceding code compiles correctly?
Runnable target = new MyRunnable();
Thread myThread = new Thread(target);
a)
public class MyRunnable extends Object{public void run(){}}
b)
public class MyRunnable implements Runnable{void runAll(){}}
c)
public class MyRunnable implements Runnable{public void run(){}}
d)
public class MyRunnable extends Runnable{public void run(){}}
54.
Which of the following protocol follows connection less service?
a)
TCP
b)
TCP/IP
c)
UDP
d)
HTTP
55.
The abbreviation of TCP is
a)
Transmission Communicational Protocol
b)
Transistor Control Protocol
c)
Transform Control Protocol
d)
Transmission Control Protocol
56.
Threads in java share the same memory space and resources.
a)
True
b)
False
57.
Which cannot directly cause a thread to stop executing?
a)
Calling the SetPriority() method on a Thread object.
b)
Calling read() method on an InputStream object.
c)
Calling notify() method on an object.
d)
Calling the wait() method on an object.
58.
Which of the following protocols is/are for splitting and sending packets to an address across a network?
a)
TCP/IP
b)
FTP
c)
SMTP
d)
UDP
59.
ISP stands for
a)
Internet Survey Period
b)
Integrated Service Provider
c)
Internet Service Provider
d)
Internet Security Protocol
60.
Which of this exception is thrown in cases when the file specified for writing is not found?
a)
IOException
b)
FileException
c)
FileNotFoundException
d)
FileInputException
61.
The _______ is the physical path over which a message travels
a)
Path
b)
Route
c)
Medium
d)
None
62.
Which of these is a full form of DNS?
a)
Data Network Service
b)
Data Name Service
c)
Domain Network Service
d)
Domain Name Service
63.
In the socket programming, for an IP address, which can be used to find the host name and IP address of a client/ server?
a)
The ServerSocket class
b)
The Socket class
c)
The InetAddress class
d)
The Connection interface
64.
Which of these statements is incorrect?
a)
By multithreading CPU idle time is minimized, and we can take maximum use of it
b)
By multitasking CPU idle time is minimized, and we can take maximum use of it
c)
Two thread in Java can have the same priority
d)
A thread can exist only in two states, running and blocked
65.
_______ it is possible to add more peers to the system and scale to larger networks.
a)
Ease of administration
b)
Reliability
c)
Scalability
d)
Portability
66.
The client requests a connection to a server using which of the following statement?
a)
Socket s = new Socket(ServerName, port);
b)
Socket s = serverSocket.accept();
c)
Socket s = serverSocket.getSocket()
d)
Socket s = new Socket(ServerName);
67.
Which of the following line of code is suitable to start a thread ? class X implements Runnable{
public static void main(String args[])
{
/* Missing code? */
}
public void run() {}
}
a)
Thread t = new Thread(X);
b)
Thread t = new Thread(X); t.start();
c)
X run = new X(); Thread t = new Thread(run); t.start();
d)
Thread t = new Thread(); x.run();
68.
Which of these methods are used to read in from file?
a)
get()
b)
read()
c)
scan()
d)
readFileInput()
69.
The server listens for a connection request from a client using which of the following statement?
a)
Socket s = new Socket(ServerName, port);
b)
Socket s = serverSocket.accept()
c)
Socket s = serverSocket.getSocket()
d)
Socket s = new Socket(ServerName);
70.
Which of these will create and start this thread? public class MyRunnable implements Runnable
{
public void run()
{
// some code here
}
}
a)
new Runnable(MyRunnable).start();
b)
new Thread(MyRunnable).run();
c)
new Thread(new MyRunnable()).start();
d)
new MyRunnable().start();
71.
How many ports of TCP/IP are reserved for specific protocols?
a)
10
b)
1024
c)
2048
d)
512
72.
What is true about time slicing?
a)
Time slicing is OS service that allocates CPU time to available runnable thread
b)
Time slicing is the process to divide the available CPU time to available runnable thread
c)
Time slicing depends on its implementation in OS
d)
Time slicing allocates more resources to thread
73.
One of the following applications of the Client and Server Model?
a)
Email
b)
Network Printing
c)
World Wide Web
d)
All of these
74.
Abbrivation of ISDN is
a)
Integrated Security Data Network
b)
Integrated Services Data Network
c)
Integrated Security Digital Network
d)
Integrated Services Digital Network
75.
______ is the advantages of hierarchical routing.
a)
Flexibility
b)
Reliability
c)
Scalability
d)
Portability
Reset
