i have a hash map in my application containing some key - values pair, i just want to compare previous value with current value of hash map and then move to next. then i wants to make next value as current and current value to previous and continue in this way till the end. can anybuddy suggest me logic, how to implement this.
Thanks !

keySet to get the keys as a set, then iterate that.

Edit: Not that "next" and "previous" have any real meaning in a HashMap.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.