Scenario based Hash /Map (Very Important) Flashcards

1
Q
  1. Entries are all objects it can be anything like 10.4F , or integer values , so at this Scenario what will you do ?
  2. Scenario : 1 in values we having 9:00 pm so we need all the travels name who is having 9:00 PM timing so what will you do ?
  3. What are all the methods you have Entry (Interface)
  4. What you will do to break the entries separately as key and value .
  5. Where and the value 10 is there i need that ? so what you will do ?
A
  1. We need to convert to objects. ,
    2.
  2. We have getKey, get value.
  3. To break separately into key ,value, we need to convert that into objects entries
    Object o = i.next();
    Map.Entry e = (Map.Entry) o;
    by this after that we can use getkey() and getvalue().
    5.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

1.What is Weakhashmap?

A
  1. Normally , if we set any key or value null after put and it used , hashmap won’t do nullify , so instead of using hashmap
    we can use Weakhashmap.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly