给个book ArrayList pages = new ArrayList(); pages.add("The Taliban, the Sunni Islamist group that took over much of Afghanistan in the 1990s, named Mansour its leader last month after confirming its previous leader, Mullah Mohammed Omar, was dead.") pages.add("A U.S.-led 2001 invasion booted the Taliban from power after it offered safe haven to al Qaeda leader Osama bin Laden, leader, but a Taliban insurgency continues in Afghanistan to this day.") get the result of a word on which page. for instance {leader:[1, 2], power:[1] } 就是找出每个字在哪几页出现。 现场跑code, 囧, 错了很多, 最后还是跑出来了。 用了regular expr string split.