這是Android Developer's Website這裏正在做什麼樣的數組初始化(Basic Java)?
IntentFilter ndef = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);
try {
ndef.addDataType("*/*"); /* Handles all MIME based dispatches.
You should specify only the ones that you need. */
}
catch (MalformedMimeTypeException e) {
throw new RuntimeException("fail", e);
}
intentFiltersArray = new IntentFilter[] {ndef, };
所以在這裏,intentFiltersArray[0] = ndef
。那麼intentFiltersArray[1]
及更高版本呢?在上面的代碼中ndef
的含義是什麼,
?
再次,它有怎樣techListsArray[][]
這裏初始化另一個代碼示例作爲
techListsArray = new String[][] { new String[] { NfcF.class.getName() } };
?我猜techListsArray[0][0]=NfcF.class.getName()
(應該是NfcF
不應該嗎?)但其他元素呢?還是它只有一個單一的元素?