我正在使用 PHP 中的这种数据结构
Array
(
[leigh@bla] => Array
(
[chat1] => Array
(
[0] => Array
(
[0] => 0
[1] => hi
[2] => 123213312
)
)
[chat2] => Array
(
[0] => Array
(
[0] => 0
[1] => whatever?
[2] => 123213312
)
[1] => Array
(
[0] => 1
[1] => ok
[2] => 23123213
)
)
)
[nelson@bla] => Array
(
[chat1] => Array
(
[0] => Array
(
[0] => 1
[1] => hello
[2] => 1232132123
)
)
)
)
这是PHP代码:
<?php
$arrTemp['leigh@bla']['chat1'][] = array(0, 'hi', '123213312');
$arrTemp['leigh@bla']['chat2'][] = array(0, 'whatever?', '123213312');
$arrTemp['leigh@bla']['chat2'][] = array(1, 'ok', '23123213');
$arrTemp['nelson@bla'] = array('chat1'=>array(array(1, 'hello', '1232132123')));
echo '<pre>';
print_r($arrTemp);
我正在尝试将这个结构存储在 Java 中。但是努力寻找合适的类型,我尝试了 ArrayList> 等。在 Java 中存储这种结构的最佳方式是什么?