JavaP2 Theory Stud

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

Question Paper - Java Part 2

Session 26-28 - Swing


1- A _________ is a component that appears as a group of folders in a file cabinet
a) Tabbed pane
b) Tree
c) Tables
2- Which swing package contains the pluggable look and feel API ?
a) javax.swing.plaf
b) javax.swing.olug
c) javax.swing.basic
d) javax.swing.tree
3- Which of the following are valid methods of the Abstract Button class? (choose 3)
a) void setDisabledIcon()
b) void setPressedIcon()
c) void setSelectedIcon()
d) void SelectionItem()

Session 30-32 - JDBC


1- The ________ uses local native libraries to communicate with the database
a. JDBC-ODBC Bridge
b. Native-API-Partly-Java Driver
c. JDBC-Net-All-Java-Driver
d. Native-Protocol-All-Java-Driver
2- The Java software provides three JDBC product components, they are
a) the JDBC DriverManager facility
b) the JDBC driver test suite
c) the JDBC-ODBC bridge
d) the callable statement
3- A __________ result set has a cursor that moves both forward and backward and
can be moved to a particular row
b) scrollable
c) nonscrollable
d) Unscrollable

Session 34 – Networking
1) Which constructor of the ServerSocket class creates a server socket an the specified
port with a queue length of 50?
a) ServerSocket(int port)
b) ServerSocket(int port,int maxQueue)
c) ServerSocket(int port,int MaxQueue,InetAddress localAddress)
2) Which of the following is a general purpose class for accessing the attributes of
resource?
a) URL Connection
b) URL Encoder
c) URL
3) The _____, and_______, and_______ classes are for use with UDP (choose 3)
a) DatagramPacket
b) DatagramSocket
c) MulticastSocket
d) ServerSocket

Session 36 – RMI
1) Which three of the following are classes of Java.rmi package?
a) Naming
b) MarshalledObject
c) RMISecurityManager
d) Remote
2) The bind() and rebind() method belongs to which class of the java.rmi package.
a) Naming class
b) RMISecurityManager class
c) RMIloader class
3) What will marshall and unmarshall your object? (choose 2)
a) Sub
b) Skeleton
c) Client
d) Server
4) Which of the following statements are true with reference to RMI ?
1. RMI is language independent.
2. RMI is platform independent.
a) Only Statement 1 is true.
b) Only Statement 2 is true.
c) Both the statements are true.
d) Both the statements are false.
5) _______ classs is a sub-class of RemoteObject in Java RMI.
a) RemoteServer
b) Operation
c) LogStream
d) MarshalledObject

Session 38 - Java Beans


1) Which interface methods allow a bean to execute in environments where a graphical
user interface is not available?
a) PropertyEditor
b) Visivility
c) BeanInfo
d) Beans
2) Which class of java beans package analyses a bean and contructs a BeanInfo object
that describes the component?
a) Introspector
b) Beans
c) BeanInfo
3) _________ is used to obtain information about the fields, constructors of any class
a) Introspection
b) Persistence
c) Reflection
d) Event
e) Attribute

Session 39 - Java Security


1) Which option of jar file indicates manifest file not created?
a) Jar M
b) Jar t
c) Jar m
d) Jar c
2) _______ option of Jar command makes a Java archive file.
a) JAR -c
b) JAR -m
c) JAR -v
d) JAR –f

10/ The ______ consists of names across all cells within an enterprise
a) Directory services
b) Security services
c) Remote services

11/ The _______ method of the ActivationDesc class returns the object containing
serialized informaion
a) getData()
b) getGroupData()
c) getRestartModel()

16/ Which of the following classes in java.lang.reflect package contains integer constants
and static methods?
a) Constructors
b) Modifiers
c) Members
d) Arrays

You might also like