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) 所有前面步驟的作用被廢除。