Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Collectons

  1. #1
    Junior Member
    Join Date
    Feb 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Collectons

    How to implement HashMap put and get methods without using Java Collection framework?

  2. #2
    Member andbin's Avatar
    Join Date
    Dec 2013
    Location
    Italy
    Posts
    443
    Thanks
    4
    Thanked 122 Times in 114 Posts

    Default Re: Collectons

    Quote Originally Posted by Raghuram View Post
    How to implement HashMap put and get methods without using Java Collection framework?
    Do you want to implement a "map" completely from scratch? It's possible, obvious. The most common and effective type of map is an "hash" map, that is a map based on an internal "hash table". So you must first understand (if you don't know), how an hash table works.
    Beware that implementing a very "good", optimal hash table is not an easy task ..... if you accept medium/low performances or not so many sophistications ... just for your study or exercise, it's ok.

    For other doubts, please ask. And explain for example what type of keys/values you want to handle (if it's a specific map) or if you want a more "general" map (and eventually if you want to use the Java 5 generics).
    Andrea, www.andbin.netSCJP 5 (91%) – SCWCD 5 (94%)

    Useful links for Java beginnersMy new project Java Examples on Google Code

  3. #3
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Collectons

    Welcome to the Forum! Please read this topic to learn how to post code correctly and other useful tips for newcomers.

Tags for this Thread