java根据汉字拼音首字母对汉字数组进行排序和定位

代码链接

运行 FirstLetterTest.java 得到以下的 jsonArray

[
    {
        "firstLetterList": [
            {
                "characters": "7号房的礼物",
                "firstLetter": "7hfdlw"
            }
        ],
        "firstWord": "7"
    },
    {
        "firstLetterList": [
            {
                "characters": "阿凡达",
                "firstLetter": "afd"
            },
            {
                "characters": "阿飞正传",
                "firstLetter": "afzc"
            },
            {
                "characters": "爱·回家",
                "firstLetter": "a·hj"
            }
        ],
        "firstWord": "A"
    },
    {
        "firstLetterList": [
            {
                "characters": "辩护人",
                "firstLetter": "bhr"
            },
            {
                "characters": "搏击俱乐部",
                "firstLetter": "bjjlb"
            },
            {
                "characters": "本杰明·巴顿奇事",
                "firstLetter": "bjm·bdqs"
            },
            {
                "characters": "霸王别姬",
                "firstLetter": "bwbj"
            }
        ],
        "firstWord": "B"
    }
    //, ...
]

你可能感兴趣的:(java根据汉字拼音首字母对汉字数组进行排序和定位)