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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:15:52+00:00 2026-05-27T22:15:52+00:00

I have hashtbles in array list. List<Hashtable<String, String>> info = new ArrayList<Hashtable<String, String>>(); Hashtable<String,

  • 0

I have hashtbles in array list.

 List<Hashtable<String, String>> info = new ArrayList<Hashtable<String, String>>();


 Hashtable<String, String> hm = new Hashtable<String, String>();
// Put elements to the map

hm.put("Read_Flag", s1);
hm.put("sms_received_id", s2);
hm.put("Sender_Id", s3);
hm.put("Sender_Name", s4);
hm.put("Patient_Name", s5);
hm.put("Received_Date", s6);
hm.put("Received_Text", s7);
hm.put("Received_Text_Full", s8);
hm.put("AttachmentFlag", s9);

// Get a set of the entries
Set<?> set = hm.entrySet();
// Get an iterator
Iterator<?> it = set.iterator();
// Display elements
while(it.hasNext()) {
Map.Entry me = (Map.Entry)it.next();
 // System.out.print(me.getKey() + ": ");
 // System.out.println(me.getValue());
}
//System.out.println(hm);

info.add(hm);

here info contains my hashtables. how can i get this “info” object into other class/intent?

Thank You…

  • 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-05-27T22:15:52+00:00Added an answer on May 27, 2026 at 10:15 pm

    Create a class that extends Serializable with getter setter for the List<Hashtable<String, String>> list

    Custom.java

    public class Custom implements Serializable{
    
        private static final long serialVersionUID = 4466821913603037341L;
        private List<Hashtable<String, String>> list;
    
    
        public List<Hashtable<String, String>> getList() {
            return list;
        }
    
        public void setList(List<Hashtable<String, String>> list) {
            this.list = list;
        }
    }
    

    To pass to next Activity.

    List<Hashtable<String, String>> list = new ArrayList<Hashtable<String,String>>();
    
    Custom custom = new Custom();
    custom.setList(list);
    intent.putExtra("myobj", custom);
    

    To retrieve in next Activity

    Intent intent = getIntent();
    Custom custom = (Custom) intent.getSerializableExtra("myobj");
    List<Hashtable<String, String>> list = custom.getList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list of string values that I want add to a hashtable
I want to have an ArrayList where it contains HashTables. I create a Hashtable
In Page_Load() function, I have populated an arraylist and a hashtable. I need to
In C# some collections such as ArrayList and HashTable have generic alternatives which are
I have a hashtable . values() method returns values in some order different from
I have a Hashtable in Java and want to iterate over all the values
I just noticed the HashTable objects have a Contains and CotainsKey method, with same
I have some code which populates a hashtable with a question as the key
I have a class that maintans a reference to a Hashtable and serializes/deserializes that
If I have function names stored as strings in a Hashtable. Is there 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.