0% found this document useful (0 votes)
8 views3 pages

AJP Unit-4

The document contains multiple-choice questions related to networking basics, focusing on protocols, classes, and methods in Java. It covers topics such as TCP/IP, server sockets, and data transmission methods. The questions test knowledge of Java networking concepts and their implementations.

Uploaded by

Sahil Tarle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

AJP Unit-4

The document contains multiple-choice questions related to networking basics, focusing on protocols, classes, and methods in Java. It covers topics such as TCP/IP, server sockets, and data transmission methods. The questions test knowledge of Java networking concepts and their implementations.

Uploaded by

Sahil Tarle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 3
ue at UDP stands for (2) User Data Port Ur User Datagram Protocol (c)__ Used Data Provider (d) User Data Protocol Name the class which is used to create a port where the server will listen. (a) Server by" Socket (c). ServerSocket (d) SocketServer ‘Communication using TCP protocol is and (a) Connection less, Iterative (b) Collection less, concurrent (c)_ Connection oriented, Iterative \(@’ Connection oriented, concurrent Which of these is a not a factory method of InetAddress class? (a) static InetAddress getLocalHost( ) (b) static InetAddress getByName(String hostname) static InetAddress getAllName(String, static InetAddress{ | getallayName(String hostname) se (a) \Which from the below use "Middle tier (a) 3tier (b) tier : (c)_n=tier {8} all of the above jeva.net package consists of interface. (=) ContentHandlerFactory (0). SocketimplFactory {c) _FileNameMap and URLStreamHandlerFactory Ud?” Allof the above v6 uses. . (a) 4 groups of 8 bits each (b) 4 group of 8 hexa-decimal digits (c)_ S.groups of 4 digits each Networking Basics iple Choice Questions for Online Exam \(dF"_ 8 groups of 4 hexa-decimal digits each Q.8 Select full form of ONS. (a) Data Network System (b) Domain Name System {c)_ Domain Name Server AY Domain Naming Service .9 — Whatis the use of WriteUTF{ ) method? (a) This method writes a string into underlying output stream. (b) This method reads a sting from underlying input stream. ley” This method writes a byte array into underlying output stream. (4) This method writes a character array into underlying output stream. Q.10 ‘Which of these is a bundle of information passed between machines? (a) MIME \(o}” Datagram {b) Cache (a) Socket Port number for FTP is saya () 23 (0 25 (@) 80 1.12 The class which encapsulates both the numerical {P address and the domain name for that address (a) DatagramPacket (b)__DatagrarnSocket Me} tnetaddress (6) Serversocket Q.13 int getServerPort( ) method returns the port number on which this @ request was received. (b) returns the port name on which the request was received. (c) returns the server number on which this request was received, «(@)7 returns the port number on which this response/request was received. a.t4 15 The constructor of URL ca 0.16 Q.17 Q.18 Q.19 Q.20 Qa. Advanced Java Programming (gar; ie) In this constructor se max_queue) what max_queue? (a) 100 (9 75 VerSocketlint por the default value for NOT so (4) 80 Lins in throw an exception. at Malformedurtexception (b)_UrlNotFoundéxception (c)_Urlexception (d)_ UrlsourceNotFoundException Which IP address is multicast IP address? (a) 192.168.2.32 (b) 235.55.45.2 (ec) 12.22.1.2 \(d}None of these Which 5 parameters uniquely identity a connection? (a) Local IP, Remote IP, Local MAC, Re Re and Protocol eee Lo Local IP, Local PORT, Remote MAC, Remote PORT and Protocol (c) Local MAC, Local PORT, Remote MAC, Remote PORT and Protocol ; (a) Local IP, Local PORT, Remote IP, Remote PORT and Protocol Select the method used to create URL connection. \WaY” URL Connection {b) open Connection (2) URL (J) URL Decoder What value is returned by the readLine( ) method when it reach at End of File? (a) EOF 4b}* null (9 0 (4) END The, class is used to create TCP server. (a) Server {b) SocketServer ‘Uy ServerSocket (d) Socket Which riethod of ServerSocket will wait for a client to initiate communication and then communication with the client? (a) wait() “fey connect ) (c)_waitForClient( )(d)_ WaitForConnect(} Q22 a2 24 Q.25 2.26 27 Q.28 Q.29 Networking Basics —__tmthodisuredioven ‘Specified in URL. aes Nbr ett) (b) getur() (©) getFiteUri() (d)_getLocalFite( ) ——_ is necessary to implement Datagram, (2) DatagramPacket (b) _DatagramSocket {) BothagB WAP None of ARB Which is the correct syntax for. wis Syntax for getLocalHost} NaF” public static inetaddress getLocalHost{ ) throws UnknownHostException (©) public static IpAddress getLocalHost( ) throws UnknownHostException Public static String getLocalHost{} throws. UnknownHostexception ‘ Public static void getLocalHost( ) throws UnknownHostException (a (d) of these method of DatagramPacket class is Used to find the destination address? (a) findAddress( ) Uby~ getAddress| ) (€) address() —(d)_whols() Connection oriented communication is possible Using classes of Java. (a) Socket and ServerSocket (0) DatagramSocket and DatagramPacket cf’. Both of these (d)_ None of these Aserver socket can connect to clients. fa) 2 {b) 2 (9 10 Ady" multiple Resolver in DNS system maps (a) Domain name to IP address \(by" IP address to domain name (c) Domain name to MAGaddress (d) MAC address to IP address Fa program consists of three classes, then after compilation how many class files will be created by the compiler? ~ (a) one ()__ uncountable . M6) three (a) zero .30 Which of the following is not a method of Security clas s? (a) socketPermission() (b) _ filePermission( ) (€) dataPermission() Udy" None of above advanced Java Programming (MSBTE) Ma.3 Networking Basics TCP does not supports Multicasting and Broadcasting because . (a) It supports full duplex communication. (b) It provides error control. (c) _Itprovides flow control ai" Its connection oriented protocol Q3t 2 Which of the following is true about TCP protocol? (LaF is reliable and connection oriented (b) is unreliable but connection oriented (c)__ is reliable and connectionless (d)_ None of these Q.33 Which class defines following methods ? int getContentLength( ) tong getDatet } long getExpiration( ) \(e}_ URLConnection (b) Datagram (0) Client (d)_ None of these 34 Name the class which is used to create a port where the server will listen? (2). Server \(EY’ Socket (6) ServerSocket (4) SocketServer Q.35 class Permission in java security package is a.36 a.37 a.38 Which methods are commonly used in ServerSocket class? {a) public OutputStream getOutputStream( ) \WbY public Socket accept ) (c)_ public synchronized void closet ) (4) None of the above Which is the proper method to retrieve the host ame of local machine? \(a)” static Inetaddress getLocalHost{ ) throws UnknownHost€xception static InetAddress get8yName(string (b) hhost_name ) throws UnknownHostException (c) « static InetAddress getAll8yName(String host_name } throws UnknownHostException (4) String getHostaddress( ) Which constructor of DatagramPacket class are used for receiving purpose? (a) DatagramPacket(byte dataf int size) DatagramPacket(byte datal J int size, int offset, int port) (b)_ DatagramPacket(byte datal |, int size, InetAddress ip, int port) DatagramPacket(byte datal J, int offset, int size, InetAddress ip, int port) DatagramPacket(byte datat J, int size) eee rae re = Daeranfatine daa ie Yd) All of these ESES) a1 (b) az W a3 @ a4 w@ as @) a6 (d) a7 () @8 i) as ( a0 Q.11. (a) Q.12 (c) Q.13 (d) Q14 (b) Qais (a) Q.16 (d) Q.17 (b) Q18 (a) «819 (b) «20 (c) Q.21 (b) Q.22 fa) Q.23 (d) Q.24 (a) Q25 (b) "26 (¢) 27 (d) 28 (b) @29 (b) 30 . (a) 31 (d) 32 (a) 33 (2) 34 (b) Qas (b) Q.36 (b) Q.37 (a) Q.38 (d) gaa

You might also like