Results 1 to 2 of 2
  1. #1
    Tim99 is offline Member
    Join Date
    Dec 2011
    Posts
    13
    Rep Power
    0

    Default Any chance of getting original type of object from Map<String, Object>?

    Hi,

    imagine I have a map to store various kinds of objects in a Map<String,Object>. Is is possible to find out the object's type after map.get("abc"); ?

    Any help is greatly appreciated!

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,178
    Rep Power
    20

    Default Re: Any chance of getting original type of object from Map<String, Object>?


Similar Threads

  1. Accessing an object from within another object from the same type in Java
    By mhasgari in forum Threads and Synchronization
    Replies: 5
    Last Post: 06-20-2011, 05:21 PM
  2. Replies: 9
    Last Post: 05-12-2011, 11:51 PM
  3. Replies: 2
    Last Post: 11-19-2010, 07:18 AM
  4. How to cast an Object into a specific type (Integer/String) at runtime
    By mailtogagan@gmail.com in forum Advanced Java
    Replies: 2
    Last Post: 12-03-2007, 02:04 PM
  5. Creating object of Type Object class
    By venkatv in forum New To Java
    Replies: 3
    Last Post: 07-17-2007, 04:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •