2016年NIIT認證預測試題

C1 jdbc中,那個類可以執行一個存儲過程?

2016年NIIT認證預測試題

1) PreparedStatement

2) Statement

3) CallableStatement

4) Connection

B2 以下那一個不是Page命令中的有效屬性?

1) import

2) export

3) session

4) errorPage

C3 以下方法中哪一個把被約束屬性的值中的變化通知給所有的listener beans ?

1) void addPropertyChangeListener()

2) PropertyChangeSupport()

3) void firePropertyChange()

4) removePropertyChangeListener()

C4 下列哪個方法不是HttpServlet類的方法?

1) Get()

2) Post()

3) Action()

4) Put()

C5 什麼是J2EE應用文件的擴展?

1)

2)

3)

4)

A6哪種應用類型在分離的層次上處理表示邏輯、業務邏輯、及數據庫的可交互性?

1) 分佈應用

2) 以服務器爲中心的應用

3) 單塊應用

4) 客戶/服務器應用

C7 使用哪個命令來生成 Stub和Skeleton類?

1) javac

2) java

3) rmic

4) rmi

B8 用以下方法中哪一個把目標應用作爲bean 激活的定製事件的監聽者(listener)註冊?

1) void addPropertyChangeListener()

2) void addXXXListener()

3) void firePropertyChange()

4) removeXXXListener()

9 B考察以下陳述:

陳述 A: 帶有bean-managed 持久性的實體bean 的代碼包含訪問數據庫的必要的SQL語句。

陳述B: 帶有container -managed 持久性的實體bean 的代碼包含訪問數據庫的必要的SQL語句。

關於這些陳述以下中哪一個爲真?

1) 這二個陳述 都爲真。

2) 陳述A爲真,陳述 B爲假。

3) 這二個陳述 都爲假。

4) 陳述A假,陳述 B爲真。

10 考察以下server類:

server類的代碼:

import .*;

import astRemoteObject;

import .*;

import .*;

public class ConvertionServerImpl extends UnicastRemoteObject

implements ConvertionServer

{

public ConvertionServerImpl() throws RemoteException

{

super();

}

public int convert(int amount) throws RemoteException

{

return amount*40;

}

public static void main(String args[])

{

ecurityManager(new RMISecurityManager());

try

{

ConvertionServerImpl instance = new ConvertionServerImpl();

nd("ConvertionServer",instance);

tln("Server Registered");

}

catch(Exception e)

{

tln(e);

}

}

}

A以下中哪個是遠程接口的正確代碼?

1) import .*;

import .*;

public interface ConvertionServer extends Remote

{

int convert(int amount) throws RemoteException;

}

2) import .*;

public interface ConvertionServer extends Remote

{

int convert(String amount) throws RemoteException;

}

3) import .*;

import .*;

public interface ConvertionServer extends Remote

{

convert(String amount) throws RemoteException;

}

4) import .*;

import .*;

public interface ConvertionServer extends Remote

{

int convert(String amount) throws RemoteException;

}

A11 servlet函數中哪個方法作爲請求的調度程序(dispatcher)?

1) service()

2) init()

3) ServletResponse()

4) ServletRequest()

C12 BDK 的以下窗口中哪一個允許你設置“Our Button” bean 的選項?

1) ToolBox window

2) BeanBox window

3) Properties window

4) Method Tracer window

C13 taglib命令的屬性是什麼?

1) Name and prefix

2) uri and value

3) uri and prefix

4) Name and value

C14 公司要你創建一個應用模塊,它要求用戶打入州的名,且它必須顯示該州的區域地圖。你將建議開發小組創建什麼類型的.企業 bean?

1) Container-managed persistence

2) Stateful session bean

3) Stateless session bean

4) Bean-managed persistence

D15 銀行事務由六個步驟組成。如果事務中前四步執行而第五步失敗,那麼會發生什麼?

1) 當前步驟的作用被廢除。

2) 前一步驟的作用被廢除。

3) 第一步的作用被廢除。.

4) 所有前面步驟的作用被廢除。