1. Trang chủ
  2. » Giáo án - Bài giảng

Bài tập trắc nghiệm JAVA

4 625 2
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 4
Dung lượng 72 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

All of above are correct 22/ For the system consisting of exclusively Java object, which distributed technology would be most approriate for communication?. On the remote service impleme

Trang 1

1/ Main component of ODBC

a Web application, DriverManager, ListDrivers, SQLServer

b Application, DriverManager, Driver, Access

c Application, DriverManager, Driver, Target-database middle ware

d Application, DriverManager, Disk, Target-database middle ware

2/ Choose the correct answers about DriverManager of ODBC

a Loads driver on a as – needed basic for application

b Maps a target database name to a specific driver

c Processes several ODBC …

3/ Choose the correct answers about Driver of ODBC

a Processes the ODBC function calls

b Modifies them to the target database format

c Submits the SQL statement to the target database, receives the results and presents the results to the application

d All of above are correct

22/ For the system consisting of exclusively Java object, which distributed technology would be most approriate for communication?

a CORBA

b JavaBeans

c RMI

d JNDI

23/ The RMI compiler rmic runs on which of the following files to produoce the stub and skeleton classes?

a On the remote interface class file

b On the remote interface Java file

c On the remote service implementation class file

d On the remote service implementation java file

24/ Which distributed object technology is most approriate for systems that consist entirely of java object?

a RMI

b CORBA

c DCE

d DCOM

25/ Which distributed object technology is most appropriate for systems that consist of objects written in different languages and that execute on different operating system platforms?

a RMI

b CORBA

c DCE

d DCOM

26/ Which of the following is not a tier of three- tier architecture?

a/ Client interface

b/ Data storage

c/ Business logic

d/ Security

27/ Which of the following is not true about RMI?

a/ RMI uses the Proxy design pattern

Trang 2

b/ The RMI client can communicate with the server without knowing the server’s physical location.

c/ RMI use obj serialization to send obj between JVMS

d/ The RMI Registry is used to generate stubs and skeletons.

28/ which of the following is NOT true a java bean ?

a/ All of its properties x have a “getx()” mehotd, where x is any property name

b/ It use the AWT event delegation model

c/ It is stored in a “.bean” file.

d/ It has a constructor funtion which has no arguments

29/ RMI URLs start with _and are followed by server, an optional port number, another slash, and the name of the remote object

a/http://

b/ ftp://

c/smtp://

d/ rmi://

30/ The RMISecurityManager all code in the program from establishing netword connections

a/ Restricts

b/ Gets

c/ Receives

d/ Accesses

31/ RMI uses the _mechanism to send objects across a network connection

a/ Non-serialization

b/ Serialization

c/ Comparation

d/ Non-comparation

32/ The _mechanism lets you delay the object construction so that a server objects is only constructed when at least one client invokes a remote method on it

a/ Deactivation

b/ Start

c/ Activation

d/ Stop

33/ The java.rmi.activation.Activatable has exportObject method The prototype of this method is :

a/ Remote exportObject(remote obj,activationID id, int port)

b/ Remote Object exportObject(remote obj, activationID id, int port)

c/ Static Remote export Object (remote obj, activationID id, int port)

d/ Static Remote Object export Object (remote obj, activationID id, int port)

34/ The RMI compiler rmic runs on which of the following files produce the stub and skeleton classes? a/ On the remote interface class file

b/ On the remote interface java file

c/ On the remote service implement action class file.

d/ On the remote service implement action java file

35/ Choose the correct statement(s)

a/ A remote object is an object on anotherr computer

b/ The client object is the object making the response (receiving a message to the other obj)

c/ The server obj is the obj sending the response.

Trang 3

d/ All are correct.

36/ Choose the correct statement(s)

a/ The rmiregistry is a special server that looks up object by name, the rmiregistry using http protocol

b/ rmic is a special complier for creating stub and skeleton.

c/ All incorrect

d/ All correct

37/ Choose the correct statement(s)

a/ the client program should use a more conservative security manager than the default we use

System.setSecurityManager(new RMISecurity.Manager());

b/ the client program should use a more conservative security manager than the default we use

class.setSecurityManager(new RMISecurity.Manager());

c/ the client program should use a more conservative security manager than the default we use

System.setRMISecurityManager(new RMISecurity.Manager());

d/ The client program should use a more conservative security manager tha the default We use

System.setRMISecurityManager(new Security.Manager());

38/ Choose the correct statement(s)

a/ Remote object are passed across the netword as stubs Non-remote object are copied.

b/ Remote object are passed the netword as skeletons Non-remote object are copied

c/ Parameter passing in the remote methods is automatically and requires no programmer intervention.

d/ Parameter passing in the remote methods is not automatically

39/ Choose the correct statement(s)

a/ The activation mechanism lets you delay the object constrution, so that a server object is only

constructed when at least one client invokes a remote method on it.

B/ The activation mechanism lets you delay the object invocation, so that a server object is only invoked when

at least one client connects a remote method on it.

c/ All incorrect

d/ All correct

40/ For RMI, you need to be running processes

a/ Three: the client, the server, the object registry

b/ Two: the client, the server

c/ Four: client, the server,rmiregistry,activation server

d/ Five: client, the server, rmiregistry,activation server and sockket server

41/ See the following statements

imoirt java.rmi.*;

public interface HelloInterface extends Remote

{

public String say();

}

Choose the correct statement(s):

a/ The code defines an interface for remote obj application

b/ The code defines an implementation class for remote obj application

c/ It’s not correct because of defining of method.

d/ It’s correct, no problem for the implementation class

Trang 4

Thuộc tính Bean:

- Simple: get/set, khai báo private

- index: get/set cho mảng và cho từng thành phần

- bound: implements PropertyChangeListener

- constraint: implements VetoableChangeListener (old/new value)

Khảo sát bên trong 1 Bean: (method, event, properties)

- Dùng interface: BeanInfo

- Dùng PropertyDescriptor (“Tên thuộc tính”, TenlopBean)

- Exception trong quá trình khảo sát IntrospectionException

- EventSetDescriptor

dap an

tạo Thread

->implements Runnable/run()

-.extends Thread

trạng thái của Thread (state)

New -> Runnable // start()

<-> Blocked -> Dead ->Dead

Cau

33

37

42

Ngày đăng: 13/05/2014, 11:20

TỪ KHÓA LIÊN QUAN

w