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: Having issues with understanding this Project

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Having issues with understanding this Project

    I am stuck on a problem that I hope to help me understand. In pseudocode.....

    I have a username and password that is downloaded into a hashmap
    Map<Integer, String> map = new Map<Integer,String>
    the password has been downloaded with hash() to show a numeric value instead of the real password

    I download a list of possible passwords into a LinkedHashSet. This is where I get lost. Help me understand how with the equals() I can check the values that I iterate through against the map.getvalue(). Thank you for your input.


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

    Default Re: Having issues with understanding this Project

    Show what you've tried with any errors, unsatisfactory results, etc.

  3. #3
    Junior Member
    Join Date
    Dec 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Having issues with understanding this Project

    I solved it.

    First sub string--> John
    First sub string's hashcode--> 2314539
    Second sub string--> 110182
    Second sub string's hashcode--> 1449559771
    shows size of hashmap 4
    ******************************
    If Key from HashMap equals the dictionary teststring's hashcode then..
    MATCHED!! Jane-Test string is two, teststring's hash value is 115276
    ------------------------------------------------------------------------------------
    ------------------------------------------------------------------------------------
    If Key from HashMap equals the dictionary teststring's hashcode then..
    MATCHED!! John-Test string is one, teststring's hash value is 110182
    ------------------------------------------------------------------------------------
    ------------------------------------------------------------------------------------
    myWordSet: [two, one, three, five, six, nine]
    HashMap: {115276=Jane, 11111=Joe, 110182=John, 22222=Tom}

Similar Threads

  1. Issues with my ordering program - if statement issues?
    By Shenaniganizer in forum What's Wrong With My Code?
    Replies: 5
    Last Post: October 31st, 2012, 10:17 PM
  2. Network connectivity issues with my project
    By vari007 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 14th, 2012, 11:56 AM
  3. My project development issues ?
    By kaliyaodi in forum Java Theory & Questions
    Replies: 5
    Last Post: December 6th, 2011, 11:16 AM
  4. Help me Understanding Please...
    By Jabetha in forum What's Wrong With My Code?
    Replies: 4
    Last Post: August 17th, 2011, 01:55 PM
  5. Replies: 1
    Last Post: April 21st, 2011, 09:59 AM