Trending questions in Java

0 votes
1 answer

How can I Sort an ArrayList in Java

You can sort the ArrayList in 2 ...READ MORE

Apr 23, 2018 in Java by sharth
• 3,370 points
972 views
0 votes
1 answer

Sort a Map<Key, Value> by values

This might help solve your problem...!!!! public class ...READ MORE

Apr 18, 2018 in Java by Rishabh
• 3,620 points
1,138 views
0 votes
1 answer

How to divide a string in two parts

String s="yourstring"; boolean flag = true; for(int i=0;i<s.length();i++) { ...READ MORE

Apr 13, 2018 in Java by Rishabh
• 3,620 points
1,350 views
0 votes
1 answer

I am learning looping statements. Can you tell me how 'for-each' works in Java?

While programming we often write code that ...READ MORE

Apr 17, 2018 in Java by Rishabh
• 3,620 points
1,056 views
0 votes
1 answer

How do I fix a NullPointerException?

When you declare a reference variable (i.e. ...READ MORE

Apr 13, 2018 in Java by Parth
• 4,640 points
1,165 views
0 votes
1 answer

How to print java array in the simplest way?

String[] arr = new String[] {"John", "Mary", ...READ MORE

Apr 17, 2018 in Java by sophia
• 1,400 points
961 views
0 votes
1 answer

How to take input from users?

Scanner Class is used to take input ...READ MORE

Apr 17, 2018 in Java by Akrati
• 3,190 points
883 views
0 votes
0 answers

Ho do I Iterate through a HashMap which contains duplicate values

What is the fastest and the best ...READ MORE

Apr 16, 2018 in Java by Daisy
• 8,140 points
898 views