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

  • SEARCH
  • Home
  • 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 8074765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:45:45+00:00 2026-06-05T14:45:45+00:00

I have a structure HashMap<String,HashMap<Integer, HashMap<Integer, question>>> lang=new HashMap<String,HashMap<Integer, HashMap<Integer, question>>>(); HashMap<Integer,HashMap<Integer,question>> section= new

  • 0

I have a structure

HashMap<String,HashMap<Integer, HashMap<Integer, question>>> lang=new HashMap<String,HashMap<Integer, HashMap<Integer, question>>>();

HashMap<Integer,HashMap<Integer,question>> section= new HashMap<Integer,HashMap<Integer,question>>();
HashMap<Integer,question> questions= new HashMap<Integer,question>();

based on my logic I fill questions, section

while(logic){
    for(someother logic){

        //make the skeleton structure of the object
        questions.add(integer,object);
    }
    section.add(integer,map3);
}

now I use this map2 as a skeleton and make changes

HashMap<Integer,HashMap<Integer,object>> tempMap= new HashMap<Integer,HashMap<Integer,object>>();
while(logicnew){
    while(logic 2){
        tempMap = new HashMap(section);
        while(logic 3){
            tempMap2 = new HashMap(tempMap.get(integer));
            //make my changes
        }
    }
    lang.add(integer,tempMap);
}

Multiple languages have multiple sections, multiple sections have multiple questions.
The problem is the values are getting over written i.e. if I have french text in the first language and english text in the second language, I just see english text in both the lang maps I make. Could you please tell what is wrong? Let me know if there is any better way to do it.

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-05T14:45:46+00:00Added an answer on June 5, 2026 at 2:45 pm

    I have deep cloned (using object serialization and deserialization) the section hashmap and stored in the temp hashmap and used the temp hashmap to add the question text which can now be added according to the language, making my lang hashmap.

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

Sidebar

Related Questions

I have a HashMap of a following structure: HashMap<Integer, int[]> map = new HashMap<Integer,
I have a java Hash, the structure is like this: HashMap<Integer, ArrayList<String>> finalMap =
I have a HashMap<String, Integer> How can I sort this data structure and keep
I have this structure based multimap and a vector for this structure: typedef std::multimap<char,
I have a function to traverse a complex deep HashMap structure. My problem is
I have a Collection as Vector<HashMap<String, String>> Actually I am using this as list
I have a class e.g. MyDataClass . I have a HashMap<String,MyDataClass> myMap; For each
I have a number of HashMap data structures containing hundreds of Comparable objects (say,
i have structure like below, <div class=btheme> <a href=/a1><img src=/a1.jpg /></a> <div class=caption> <div>image
I have nested structure very similar to folder structure, like: Array ( [level_one_1] =>

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.