Вы находитесь на странице: 1из 5

602: Advance Java

Question Option 1 Option 2 Option 3 Option 4


which of the following is not JDBC API JDBC DriverManager JDBC Driver JDBC Records
part of JDBC Architecture
what are the correct i,ii,iii,iv i,ii,iii,iv ,v i,iii,iv,v i,ii,iv,v
methods of ResultSet if rs is
object belongs to ResultSet
rs.getString();
rs.getInt();
rs.getCharacter();
rs.getFloat();
rs.setString();
rs.updateString();
what is the use of it is used to print used to print this Throwable it is used to trace the it is used to print stack
PrintStackTrace() method results along with other details like program error pointers
class name and line number
where the exception
occurred means its backtrace
what is the correct syntax of String String String Connection
establishing connection with url=”jdbc.odbc.myds url=”jdbc:odbc:accessdb”; url=”sun.jdbc.OracleDrive c=(“sun.jdbc.odbc.JdbcO
database n”; Connection r.database”; dbcDriver”);
Connection con=DriverManager.getConn Connection DriverManager
c=Driver.establishCo ection(url,””.””); c=DriverManager.obtainC DM=c.getConnection(“jd
nnection(url); onnection(url); bc:odbc:dsn”);
Which of the following is setBatch() addBatch() deleteBatch() removeBatch()
method of JDBC batch
process?
Which statements about i ,ii ii,iii i,ii,iii i and iv only
JDBC are true?
i) JDBC is an API to connect to
relational-, object- and XML
data sources
ii) JDBC stands for Java
DataBase Connectivity
Iii) JDBC is an API to access
602: Advance Java

relational databases,
spreadsheets and flat files
iv) DBC is an API to bridge the
object-relational mismatch
between OO programs and
relational databases

which of the following are Type 1 and Type2 Type 2 and Type 3 Type 3 and Type 4 Type 1 and type4
partly java Drivers
i)Type1
ii)Type 2
Iii) Type 3
iv) Type 4
How can you retrieve By invoking the By invoking the method By invoking the method By invoking the methods
information from a method get(…, String get(…, Type type) on the getValue(…), and cast the on the ResultSet:
ResultSet? type) on the ResultSet, where Type is an result to the desired Java getString(…), getBoolean
ResultSet, where object which represents a type. (…), getClob(…),getInt()
type is the database database type etc
type
Which of the following Database.getMaxCon Connection.getMaxConnecti DatabaseMetaData.getM ResultSetMetaData.getM
methods finds the maximum nections ons axConnections axConnections
number of connections that a
specific driver can obtain?
Which of these class is used DatagramPacket URL InetAddress ContentHandler
to encapsulate IP address
and DNS?
602: Advance Java

What will be the output of 0 1 TRUE FALSE


following code:
import java.net.*;
Class networking
{ public static void
main(String[] args) throws
UnknownHostException
{ InetAddress obj1 =
InetAddress.getByName("ww
w.google.com");
InetAddress obj2 =
InetAddress.getByName("ww
w.google.com");
boolean x =
obj1.equals(obj2);
System.out.print(x);
} }
_____ protocol is more TCP UDP SMTP FTP
efficient in terms of latency
and bandwidth
What happens if IP Address the system exits with UnknownHostException is IOException is thrown ClassNotFoundException
of host cannot be no message thrown is thrown
determined?
What happens if The system exits The system will wait till port IOException is thrown PortOccupiedException is
ServerSocket is not able to gracefully with is free when opening the socket thrown
listen on the specified port? appropriate message
which of these is not a static InetAddress static InetAddress static InetAddress static InetAddress[]
factory method of getLocalHost() getByName(String hostname) getLogicalName(String getAllByName(String
InetAddress Class hostname) hostname)
602: Advance Java

Which of the following i,ii,iii,iv,v i,ii,iv,v,vi i,iii,iv,v,vi i,ii,iv,v


classes used for socket
programming
ContentHandler
DatagramPacket
Thread
Socket
ServerSocket
InetAddress
Applet
Frame

which of the following PrintWriter pw=new DataInputStream is = new DataInputStream dis=new Stream s=new
creates I/O streams for PrintWrite(); DataInputStream(client.getIn DataOutputStream(); StreamSocket(Client.getS
communication to the client BufferedReader putStream()); DataOutputStream tream);
br=new DataOutputStream os = new dos=new FileStream fis=new
BufferedReader(); DataOutputStream(client.get DataInputStream(); FileStream(Servet.getStr
OutputStream()); eam);
A server can connect to 1 4 32 Multiple
what are the methods of i,ii,iii,iv,v ii,iii,iv,v i,ii,iii,v i,iii,iv,v,vi
ServerSocket Class.
Public socket accept()
Public outputStream
getOutPutStream()
Public synchronized void
close()
Public synchronized void
establish()
Public inputStream
getInputStream
Throwable throw Exception
The time required to create a reater than the time less than the time required equal to the time d) none of the
new thread in an existing required to create a to create a new process required to create a new mentioned
process is ___________ new process process
602: Advance Java

Вам также может понравиться