<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aaditya Kavthekar on Medium]]></title>
        <description><![CDATA[Stories by Aaditya Kavthekar on Medium]]></description>
        <link>https://medium.com/@aadityakavthekar?source=rss-632b0c63561b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*zuLiFGUs0s_5rzNk.</url>
            <title>Stories by Aaditya Kavthekar on Medium</title>
            <link>https://medium.com/@aadityakavthekar?source=rss-632b0c63561b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 12:23:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aadityakavthekar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to sort a HashMap by its values in the Java language?]]></title>
            <link>https://medium.com/@aadityakavthekar/how-to-sort-a-hashmap-by-its-values-in-the-java-language-56b8ee4dd36b?source=rss-632b0c63561b------2</link>
            <guid isPermaLink="false">https://medium.com/p/56b8ee4dd36b</guid>
            <category><![CDATA[hashmap-sorting-in-java]]></category>
            <category><![CDATA[hashmap]]></category>
            <category><![CDATA[how-to-sort-map-by-values]]></category>
            <category><![CDATA[java-map-sorting]]></category>
            <category><![CDATA[map-sorting-by-values]]></category>
            <dc:creator><![CDATA[Aaditya Kavthekar]]></dc:creator>
            <pubDate>Fri, 24 Jun 2022 16:30:46 GMT</pubDate>
            <atom:updated>2022-06-24T16:30:46.286Z</atom:updated>
            <content:encoded><![CDATA[<p>As we already know, we can sort a Map by its keys with the help of a TreeMap, and we can also sort it by its values as shown in below code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VDT2Aw5wxypEOeZSynah-Q.jpeg" /><figcaption>Java HashMap Data</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WROhSeJLaa9lO3dL1oEXww.jpeg" /><figcaption>Sort HashMap by its values in Java</figcaption></figure><h3><strong>Output of the above program:</strong></h3><p>Before sorting = [1=Java, 4=Ruby, 2=C++, 3=Python]</p><p>After sorting = [2=C++, 1=Java, 3=Python, 4=Ruby]</p><p><strong>You can download this code from below GitHub link: </strong><br><a href="https://github.com/aaditya-kavthekar/coding/blob/main/MapSortingDemo.java">https://github.com/aaditya-kavthekar/coding/blob/main/MapSortingDemo.java</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56b8ee4dd36b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>