NIIT認證J2ME考試真題
1) 下面的哪個包包含由MIDP支持的GUI組件?P3.5
1. et 2.
3. 4. i
2) 思考下面的代碼:
import et.*;
import i.*;
public class Hello extends MIDlet
{
private Display Exhibit;
private Form show;
public Hello()
{
Exhibit = isplay(this);
show = new Form("Name");
}
public void startApp() throws MIDletStateChangeException
{
urrent(show);
}
public void pauseApp()
{
}
public void destroyApp(boolean unconditional)
{
}
}
下面的哪個代碼段應該被增加到上述的代碼中來創建一個字符串項並將它顯示在屏幕上?P2.8-2.9
1. StringItem strIt = new StringItem(" ", "Msg"); nd(strIt);
2. StringItem strIt = new StringItem(" ", "Msg"); nd(strIt);
3. show = new StringItem(" ", "Msg"); nd(strIt);
4. StringItem strIt = new StringItem(" ", "Msg"); nd(show);
3) 你正在為一個銀行程序開發一個MIDlet。當客户向銀行發送一個請求時,一個進程指示將一直顯示,直到請求被處理完為止。進程指示應該被嵌入到form組件中。下面 的哪個方法可以在設備屏幕上顯示進程指示?P4.16
1. public void showGauge() { Form form = new Form(“Gauge”); Gauge gauge = new Gauge (“Progress”, false, 100, 0); nd (gauge); Display display = isplay(this); urrent(form); }
2. public void showGauge() { Gauge gauge = new Gauge (“Progress”, false, 100, 0); Display display = isplay(this); urrent(gauge); }
3. public void showGauge() { Form form = new Form(“Gauge”); Gauge gauge = new Gauge (“Progress”, false, 100, 0); nd (gauge); urrent(form); }
4. public void showGauge() { Form form = new Form(“Gauge”); Gauge gauge = new Gauge (“Progress”, false, 100, 0); nd (gauge); Display display = urrent(form); urrent(gauge); }
4) 在J2ME中,下面的哪個包可以使用網絡連接?P3.4
1. et
2. i
3.
4.
5) 思考下面的陳述:
陳述A:標準的J2ME工具包可以解析XML文件。
標準B:基於XML解釋器的事件保存被移動設備解析的整個XML文件。
關於上面陳述,下面哪項是正確的?P5.20
1. 陳述A是正確的,陳述B是錯誤的。 2. 陳述A是錯誤的,陳述B是正確的。
3. 兩個陳述都是正確的。 4. 兩個陳述都是錯誤的。
6) 你正在編寫連接到Web服務器上運行的一個servlet的MIDlet代碼。MIDlet的代碼段如下所示:
public void connhandler()
{
HttpConnection con = null;
display("Obtaining Connection from Server..." );
try
{
con = ect(url, this );
display("Connecting to the server..." );
int response = esponseCode();
if( response == _OK )
{
StringBuffer text = new StringBuffer();
// Here's where you read the data.
// This case expects an integer
// followed by zero or more
// strings.
try
{
DataInputStream din = new DataInputStream(InputStream() );
int n = Int();
while( n-- > 0 )
{
nd(UTF() );
nd( '"n' );
}
}
catch( IOException e )
{
}
done("Your current balance:"n" + ring() );
}
else
{
done("Unexpected return code: " + rc );
}
}
catch( IOException e )
{
done( "Exception " + e + " trying to connect." );
}
}
編譯MIDlet代碼後,你試圖不啟動Web服務器來連接servlet。根據上面的代碼段,程序將會輸出什麼?P6.17
1. Unexpected return code: 500
2. Unexpected return code: 302
3. Unexpected return code: 303
4. Exception ception trying to connect
7) 一個文本文件包含幾行文本,一個在MIDlet和文本文件之間的連接已經被建立。下面的哪個代碼段將打開一個輸入連接並每次從這個文本文件中獲取一行文本?P5.12
1. InputStream ins = null; ins = InputStream(); StringBuffer buffer = new StringBuffer(); int i; while ((i=())!= -1) { if (i!='"n') { nd(i); } }
2. InputStream ins = null; ins = InputStream(); StringBuffer buffer = new StringBuffer(); int i; while ((i=())!= -1) { if (i!='"n') { nd((char)i); } }
3. InputStream ins = null; ins = OutputStream(); StringBuffer buffer = new StringBuffer(); int i; while ((i=())!= -1) { if (i!='"n') { nd((char)i); } }
4. InputStream ins = null; ins = InputStream(); StringBuffer buffer = new StringBuffer(); char i; while ((i=())!= -1) { if (i!='"n') { nd((char)i); } }
8) 確定包的類。P3.4
1. Connector 和 ConnectionNotFoundException 2. InputStream 和OutputStream
3. DataInput 和 DataOutput 4. DataInputStream 和 DataOutputStream
9) RecordEnumeration接口定義了下面的`哪個方法?P7.4
1. enumerateRecords() 2. getRecord() 3. nextRecord() 4. addRecord()
10) 代碼段如下所示:(19)
代碼段1:
byte[] ba = new byte[50];
int nob = ecord (id, ba, 0);
代碼段2:
byte[] ba = null;
ba = ecord (id);
代碼段3:
byte[] ba = new byte[50];
ba = ecord (id);
代碼段4:
byte[] ba = null;
int nob = ecord (id, ba);
用下面哪個代碼段從記錄存儲中獲取一條特定記錄?P7.8
1. 僅代碼段1和代碼段3 2. 僅代碼段2和代碼段4
3. 代碼段2、代碼段3和代碼段4 4. 代碼段1、代碼段2和代碼段3
11) SaveMyMoney銀行為他們的客户介紹移動銀行業務。有一個應用程序使用名為的記錄存儲,使客户方便的記錄所有提交到銀行的單據。你能夠使用下面哪段代碼獲取中的列舉對象?P7.10
1. public void getEnum() { RecordStore rs; rs = RecordStore(“checks”, true); rs = erateRecords (null, null, false); }
2. public void getEnum() { RecordEnumeration re; RecordStore rs; rs = RecordStore(“checks”, true); re = erateRecords (null, null, false); }
3. public void getEnum() { RecordStore rs; rs = RecordStore(“checks”, true); RecordEnumeration re = erateRecords (null, null, false); }
4. public void getEnum() { RecordEnumeration re; RecordStore rs; rs = RecordStore(“checks”, true); rs = erateRecords (null, null, false); }
-
NIIT簡歷
被美國IDC(國際數據公司)評為排名世界前16名的國際IT培訓機構,是亞洲唯一入選的公司。在最佳亞洲IT管理公司評選中排名第二NIIT的軟件開發資質獲得SEICMMI5級的評估,這是由SEI頒發的.軟件能力成熟度模型中最高等級評估,是全球最早獲得的第十二家公司之一。NIIT是...
-
2016關於NIIT認證的問與答
目前,NIIT已成為全球最大的IT教育和提供IT解決方案的公司,同時,NIIT擁有近8000人規模的服務外包軟件開發團隊、超過500人規模的軟件課程體系研發團隊,傲居全球軟件培訓及信息技術領域的領導地位。下面為大家整理的是NIIT認證的常見問題解答!問:在這座城市裏有大量...
-
Microsoft 技術專員認證考試
20世紀80年代末90年代初,微軟公司在其MS-DOS操作系統的基礎上推出了Windows3.x系統,進行了一次有利的嘗試。下面是小編整理的關於Microsoft技術專員認證考試,希望大家認真閲讀!Microsoft技術專員(MTA)-微軟認證PearsonVUE的又一個合作伙伴,全球領先的軟件、服務、...
-
NIIT軟件開發工程師
NIIT是專門提供教育,培訓,軟件解決方案和教育多媒體的上市公司。是一個年收入超過3億美元,每年按50%速度增長的IT公司。下面是小編收集的NIIT軟件開發工程師,希望大家認真閲讀!軟件開發方向技能班次技能學制培養目標就業方向核心課程軟件開發基礎班3個月培養具有扎...