About Question enthuware.ocpjp.v7.2.1331 :
Moderator: admin
-
- Posts: 8
- Joined: Sun Feb 03, 2013 9:47 am
- Contact:
About Question enthuware.ocpjp.v7.2.1331 :
I don't understand the question...
-
- Site Admin
- Posts: 10090
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1331 :
It is asking what happens when you call the put method.
If you like our products and services, please help us by posting your review here.
-
- Posts: 97
- Joined: Wed Dec 28, 2016 9:00 am
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1331 :
It would be a lot helpful if someone would post which classes allow null key/values insertion and which not.
-
- Posts: 5
- Joined: Fri Nov 18, 2016 10:49 am
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1331 :
FYI: The function returns the previous value associated with key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key.)
I was doubting.
I was doubting.
-
- Posts: 56
- Joined: Tue Feb 21, 2017 4:24 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1331 :
No Nulls: ArrayDeque, Hashtable, TreeSet, ConcurrentHashMap, ConcurrentSkipListMap (and most other concurrent collections)
No Null Keys: TreeMap
Everything else is OK with null, as much as I was able to gather...
No Null Keys: TreeMap
Everything else is OK with null, as much as I was able to gather...
-
- Posts: 27
- Joined: Thu Aug 24, 2023 4:33 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1331 :
I am confused about the put() method signature.
The signature of put() method in HashMap is V put(K key, V Value);
Where is that signature with objects coming from?
The signature of put() method in HashMap is V put(K key, V Value);
Where is that signature with objects coming from?
-
- Site Admin
- Posts: 10090
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1331 :
V and K are type parameters. They are relevant only while compilation. After compilation, they are replaced by Object (or their bounds).
If you like our products and services, please help us by posting your review here.
-
- Posts: 27
- Joined: Thu Aug 24, 2023 4:33 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1331 :
Yes that is correct.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 34 guests