>tfw you fell for the cs meme
>tfw you have to work on your C# assignment
>tfw you haven't started yet and are playing assassin's creed instead
why is CS so much pain /g/?
it isnt
you chose a major ill suited to you
pick another
>>53876323
you sound like an idiot I knew during me EE studies. He dropped out, went back to being a NEET and leeching off of his parents for the coming 6 years.
You're a peasant, end of story.
>>53876323
it could be worse
it could be Java
all I want is to get HashMap<String, Integer> entries into an array and sort by value, but apparently it takes a wizard to do this in Java 7
>>53876323
I went into college with an Accounting major and CS minor. About a year in I switched them, because accounting, while solid job security, is boring as hell. Just switch majors anon.
Drop out if you dont like it?
>>53876323
Love and Pain are the same, anon.
>>53876425
Don't blame Java for your skills..SortedSet<String> keys = new TreeSet<String>(myHashMap.keySet());
SortedSet<String> values = new TreeSet<String>(myHashMap.values());
Or rather this?List keys = new ArrayList(yourMap.keySet());
Collections.sort(keys)
its probably not the best career choice for you, if you continue this path you will probably burn out in couple of years and your life will be suffering, like mine
>>53876547
>Don't blame Java for your skills
the pair relationship is necessary, so I need to sort Set<Map.Entry<String, Integer>> by the (Integer) value of each Entry. Getting the keys and values separately is pretty useless.
>I like vidya therefore CS is perfect for me
>>53876768
I know sounds dumb but I thought it would be fun. I guess I will have to push through until I graduate.
>>53876653
>Getting the keys and values separately is pretty useless.
No it's not.
So you just need to order the keys (in a seperate list) and can still directly access the HashMap in the order you want.
HASHMAP a { 3 -> "a"; 1 -> "You"; 2 -> "are"; 4 -> "faggot."}
SET b = a.keySet()
SORT(b)
PRINT a.get(b[0]) + a.get(b[1]) + a.get(b[2]) +a.get(b[3])
>>53876916
Kys. You are the reason CS it's going downhill
>A have python assignment due in two weeks
>we have to take in two numbers and output the average
>haven't even started yet
a-am i gonna make it?