1)Assume there is a string
101_DE|102_AR|103_|104_JK|105_|106_KI|107_|108_BA
where | is the separator and portion before _ is the key and the portion after _ is value.
a) Convert the above string to a two-dimensional array such as below.
arrayname[0][0] is 101
arrayname[0][1] is DE
…..
b) Convert the above string to a Vector of Hashtable and use KEY and VALUE as the parameter name to store the values in Hashtable such as below.
hashtablename.get(“KEY”) is 101
hashtablename.get(“VALUE”) is DE
Hashtable HT = new Hashtable()
HT.put(101,”DE”);
HT.put(“KEY”,101);
HT.put(“VALUE”,”DE”);
HT.put(“KEY”,102);
Integer n = HT.get(101)
HT.get(“KEY”) 101
HT.get(“VALUE”) “DE”
这两题要怎么做,详细代码(JAVA)