Assignment - 10 Solution
Assignment - 10 Solution
PROGRAMMING IN JAVA
Assignment10
TYPE OF QUESTION: MCQ
Number of questions: 10 Total mark: 10 × 1 = 10
______________________________________________________________________________
QUESTION 1:
Which of the following statement(s) is(are) true?
Correct Answer: d
Detailed Solution:
TCP is a reliable but slow. UDP is not reliable but comparatively fast. HTTPS is the secure
version of HTTP, where all communications between two computers are encrypted.
___________________________________________________________________________
QUESTION 2:
Which of the following statement(s) is/are true?
Correct Answer: e
Detailed Solution:
public class DatagramSocket extends Object implements Closeable is the class that represents a
socket for sending and receiving datagram packets.
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
____________________________________________________________________________
QUESTION 3:
Which of the following is/are interface(s) present in java.net package?
a. InterfaceAddress
b. FileNameMap
c. DatagramPacket
d. DatagramSocket
Correct Answer: b
Detailed Solution:
FileNameMap is an interface in java.net package and the other options are classes from the
same package.
____________________________________________________________________________
QUESTION 4:
Which of the following statement(s) is/are true?
Correct Answer: a
Detailed Solution:
_________________________________________________________________________
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
QUESTION 5:
In context of the following URL, identify the correct option.
https://nptel.ac.in
Correct Answer: b
Detailed Solution:
Resource name is nptel.ac.in. The protocol used is https and hence provides a secure connection
to the website. The link is complete in all aspects and hence can open a website (if hosted). The
ac.in portion of the website is top-level domain part and not a path.
____________________________________________________________________________
QUESTION 6:
Which of the following is/are application layer protocol(s)?
a. TCP
b. UDP
c. ARP
d. SMTP
Correct Answer: d
Detailed Solution:
TCP, UDP are transport layer protocols. ARP is a Network - IP layer protocol. SMTP is
Application layer protocol.
___________________________________________________________________________
QUESTION 7:
What is true about IP:PORT in the following options?
Correct Answer: a, c
Detailed Solution:
Port number 21 is the default FTP port. For a FTP connection both the IP and the PORT is
required. 127.0.0.1 is the loop-back IP address of a system, which is same as localhost domain.
The concept of PORT in IPv6 is same as in IPv4 although there is some variation in the syntax.
_______________________________________________________________________
QUESTION 8:
Which of the following is/are valid Data Definition Language (DDL) command(s)?
a. SELECT
b. INSERT
c. UPDATE
d. ALTER TABLE
Correct Answer: d
Detailed Solution:
ALTER TABLE is a Data Definition Language (DDL).
_____________________________________________________________________________
QUESTION 9:
In JDBC, all raw data types (including binary documents or images) should be read and
uploaded to the database as an array of
a. byte
b. vector
c. char
d. file
Correct Answer: a
Detailed Solution:
All data types should be read and uploaded to the database as an array of bytes.
______________________________________________________________________________
QUESTION 10:
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
a. java.net
b. java.lang
c. java.io
d. java.sql
Correct Answer: d
Detailed Solution:
All classes and interfaces related to JDBC are defined in java.sql package.
____________________________________________________________
************END************