On This Page

This set of Advanced JAVA Multiple Choice Questions & Answers (MCQs) focuses on Advanced Java Set 2

Q1 | BLOB, CLOB, ARRAY and REF type columns can be updated in
  • jdbc 1.0
  • jdbc 4.0
  • jdbc 2.0
  • jdbc 3.0
Q2 | Which of the following methods finds the maximum number of connectionsthat a specific driver can obtain?
  • database.getmaxconnections
  • connection.getmaxconnections
  • databasemetadata)getmaxconnections
  • resultsetmetadata)getmaxconnections
Q3 | When the message “No Suitable Driver” occurs?
  • when the driver is not registered by class.forname() method
  • when the user name, password and the database does not match
  • when the jdbc database url passed is not constructed properly
  • when the type 4 driver is used
Q4 | Which driver is called as thin-driver in JDBC?
  • type-4 driver
  • type-1 driver
  • type-3 driver
  • type-2 driver
Q5 | How many trAnsweraction isolation levels are defined in javA)sql.Connectioninterface?
  • 4
  • 3
  • 5
  • 2
Q6 | Which method is used to perform DML statements in JDBC?
  • execute()
  • executequery()
  • executeupdate()
  • executeresult()
Q7 | What is the disadvantage of Type-4 Native-Protocol Driver?
  • at client side, a separate driver is needed for each database.
  • type-4 driver is entirely written in java
  • the driver converts jdbc calls into vendor-specific database protocol
  • it does not support to read mysql data)
Q8 | TCP,FTP,Telnet,SMTP are example of?
  • socket
  • ip address
  • protocol
  • mac address
Q9 | In Inetaddress class which method returns the host name of IP address?
  • public string gethostname()
  • public string gethostaddress()
  • public string inetaddress getlocalhost()
  • none
Q10 | Show some networking terminology given below?
  • all
  • ip address
  • protocol
  • mac address
Q11 | Which classes are used for connection less socket programming?
  • datagram socket
  • datagram packet
  • both a and b
  • none
Q12 | how many ports TCP/IP are reserved for specific protocol?
  • 10
  • 1024
  • 2048
  • 512
Q13 | how many bits are in a single IP address?
  • 8
  • 16
  • 32
  • 64
Q14 | Which of these class is used to encapsulate IP address and DNS?
  • datagram packet
  • url
  • inetaddress
  • contenthandler
Q15 | Which of these is return type of getAddress method of DatagramPacket class?
  • findaddress()
  • getaddress()
  • address()
  • whois()
Q16 | Which of these method of DatagramPacket is used to find port number?
  • port()
  • getport()
  • findport()
  • receivedport()
Q17 | Which of these class is necessary to implement datagrams?DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI,PUNE - 45PROF . SUPRIYA MANE www.dacc.edu.in
  • datagrampacket
  • datagramsocket
  • all of the mentioned
  • none of the mentioned
Q18 | Which of these method of DatagramPacket is used to find the port number?
  • port()
  • getport()
  • findport()
  • recieveport()
Q19 | Which of these method of DatagramPacket is used to obtain the byte array ofdata contained in a datagram?
  • getdata()
  • getbytes()
  • getarray()
  • recievebytes()
Q20 | Which of these method of DatagramPacket is used to find the length of bytearray?
  • getnumber()
  • length()
  • length()
  • getlength()
Q21 | Which of these method is used to start a server thread?
  • run()
  • start()
  • runthread()
  • startthread()
Q22 | Which of these method is called when http daemon is acting like a normal webserver?
  • handle()
  • handleget()
  • handleget()
  • handleget()
Q23 | Which of these methods of httpd class is used to read data from the stream?
  • getdta()
  • getresponse()
  • getstream()
  • getrawrequest()
Q24 | Which of these method of httpd class is used to get report on each hit to HTTPserver?
  • log()
  • logentry()
  • loghttpd()
  • logresponse()
Q25 | Which of these method is used to find a URL from the cache of httpd?
  • findfromcache()
  • findfromcache()
  • servefromcache()
  • getfromcache()