Top 250+ Solved Advanced JAVA MCQ Questions Answer

From 31 to 45 of 223

Q. Which method is used to perform DML statements in JDBC?

a. execute()

b. executequery()

c. executeupdate()

d. executeresult()

  • c. executeupdate()

Q. What is the disadvantage of Type-4 Native-Protocol Driver?

a. at client side, a separate driver is needed for each database.

b. type-4 driver is entirely written in java

c. the driver converts jdbc calls into vendor-specific database protocol

d. it does not support to read mysql data)

  • a. at client side, a separate driver is needed for each database.

Q. TCP,FTP,Telnet,SMTP are example of?

a. socket

b. ip address

c. protocol

d. mac address

  • c. protocol

Q. In Inetaddress class which method returns the host name of IP address?

a. public string gethostname()

b. public string gethostaddress()

c. public string inetaddress getlocalhost()

d. none

  • a. public string gethostname()

Q. Show some networking terminology given below?

a. all

b. ip address

c. protocol

d. mac address

  • a. all

Q. Which classes are used for connection less socket programming?

a. datagram socket

b. datagram packet

c. both a and b

d. none

  • c. both a and b

Q. how many ports TCP/IP are reserved for specific protocol?

a. 10

b. 1024

c. 2048

d. 512

  • b. 1024

Q. how many bits are in a single IP address?

a. 8

b. 16

c. 32

d. 64

  • c. 32

Q. Which of these class is used to encapsulate IP address and DNS?

a. datagram packet

b. url

c. inetaddress

d. contenthandler

  • c. inetaddress

Q. Which of these is return type of getAddress method of DatagramPacket class?

a. findaddress()

b. getaddress()

c. address()

d. whois()

  • b. getaddress()

Q. Which of these method of DatagramPacket is used to find port number?

a. port()

b. getport()

c. findport()

d. receivedport()

  • a. port()

Q. Which of these class is necessary to implement datagrams?DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE - 45PROF . SUPRIYA MANE www.dacc.edu.in

a. datagrampacket

b. datagramsocket

c. all of the mentioned

d. none of the mentioned

  • c. all of the mentioned

Q. Which of these method of DatagramPacket is used to find the port number?

a. port()

b. getport()

c. findport()

d. recieveport()

  • a. port()

Q. Which of these method of DatagramPacket is used to obtain the byte array ofdata contained in a datagram?

a. getdata()

b. getbytes()

c. getarray()

d. recievebytes()

  • a. getdata()

Q. Which of these method of DatagramPacket is used to find the length of bytearray?

a. getnumber()

b. length()

c. length()

d. getlength()

  • d. getlength()
Subscribe Now

Get All Updates & News