Try to search your question here, if you can't find : Ask Any Question Now ?

What is difference between isEmpty() and size() for hashmap if used under if condition?

HomeCategory: stackoverflowWhat is difference between isEmpty() and size() for hashmap if used under if condition?
pushpa asked 2 weeks ago

I have to deal with NullPointerException which is occuring on Hashmap . Shall I use map.isEmpty() or (map.size() > 0) inside if condition? Which one is better?

1 Answers
Best Answer
Arben answered 2 weeks ago
Your Answer

1 + 8 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com