CSV到哈希图的顺序

时间:2018-12-12 04:19:31

标签: java csv hashmap

所以我有一个CSV文件,其中包含一个字符串标题,然后是用于输入的字符串数组。我已经使用它们将它们加载到HashMap>中,但是我需要保持CSV文件中条目的顺序;目前,它似乎是以随机模式添加的,而我在创建的哈希表中使用while循环进行迭代。什么是解决此问题的最佳方法?

CSV内容的格式如下:

01. Remove this emulator.
02. Create new emulator.
03. C:\Users\*user*\.gradle\caches file delete. 
04. Restart your android studio.

并需要保持输出顺序

当前输出:

title    content
title1    entry, entry, entry
title2    entry, entry
title3    entry

0 个答案:

没有答案