Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8089591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:26:42+00:00 2026-06-05T19:26:42+00:00

I have a java map with string in its key and integer in its

  • 0

I have a java map with string in its key and integer in its value. I want to remove a particular entry(key/value) from this map which doesn’t have value greater than 5. Can any body suggest me how can I do this?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T19:26:44+00:00Added an answer on June 5, 2026 at 7:26 pm

    If you’ve only got a regular map (i.e. no additional data structure that implements a reverse mapping), then your best option is to iterate the value set, test each value, and use Iterator.remove() to remove the relevant ones.

    If you have a secondary data structure, you may be able to use it to identify the entries to be removed. But the “cost” is that such a data structure takes space to represent and time to update … and your code is more complex.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a key value pair in Hashmap in Java, I am traversing Map
I have this class in Java (it's from JaCoCo Project): public class MemoryMultiReportOutput implements
I have a JSON file which is populated to an activity (Main.java). This Activity
I have a HBase table (from java) and i want to query the table
I have a system that entities (from database, represented as Java objects through ORM)
I have a Java Property file and there is a KEY as ORDER .
I have a singleton class, that has a map which can be accessed by
I have a Map keyed by Integer. Using EL, how can I access a
Based on this question I have a couple of other questions: 1) the map
I'm new to C++ and am porting over code from Java. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.