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 8941303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:16:10+00:00 2026-06-15T11:16:10+00:00

I have 2 maps as shown below and I want the output as a

  • 0

I have 2 maps as shown below and I want the output as a new Map in the required format shown below? Please suggest if this is possible.

Map<String,String> abc = new HashMap<String, String>();
abc.put("Apple", "Mobile");
abc.put("Apple", "Tablet");

Map<String,String> def = new HashMap<String, String>();
def.put("Mobile", "iphone5");
def.put("Tablet", "iMini");

Required o/p format”

Map<String,Map<String,String>> xyz= new HashMap<String, Map<String,String>>();

Example
{{Apple={Mobile=[iphone]},Apple={Tablet=[iMini]}}

  • 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-15T11:16:11+00:00Added an answer on June 15, 2026 at 11:16 am

    Yes it is possible.

    Map<String,Map<String,String>> mapOfMap = new HashMap<String,Map<String,String>>();
    
    mapOfMap.put("map1", new HashMap<String,String>());
    
    mapOfMap.put("map2", new HashMap<String,String>());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have google maps added to UIWebview. I want to zoom the map to
Let's say I have two maps: typedef int Id; std::map<Id, std::string> idToStringMap; std::map<Id, double>
I have the following sample class that maps to a MySql table (shown below).
I have a google maps directions link shown in XML: http://maps.googleapis.com/maps/api/directions/xml?origin=111%20Davisville%20Avenue,Toronto,ON&destination=469%20King%20Street%20West,%20Toronto,%20ON&sensor=false&dirflg=r Even though it
I have two maps of type Map<Long, Integer>, one named oldValues representing the old
i have google Maps and when the user touch any point in the map
I have several GWT Maps API JavaScriptObjects (LatLng, Polyline) which I want to send
Hi I have this weird problem with Google Maps V3 API. Showing multiple markers
I am trying to implement this example http://www.javacodegeeks.com/2011/02/android-google-maps-tutorial.html and i have followed exactly all
I've 2 function as below: function addMarker() { marker = new google.maps.Marker({ position: Gpoint,

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.