Discussion :: Declarations and Access Control - Pointing out the correct statements (Q.No.3)
Sarang said: (May 18, 2012) | |
I dont understand why import java.util.* statement is required when we use import java.util.TreeMap; Can somebody explain? because TreeMap is the only class that needs to be imported. |
Joshi Saryu said: (Jun 15, 2012) | |
I don't understand why import java. Util. * statement is required when we use import java.Util.TreeMap;. Can somebody explain? because TreeMap is the only class that needs to be imported. |
Ramesh said: (Aug 14, 2013) | |
I don't understand the util, treeset and treemap please give brief explanation about these? |
Muthupandian said: (Nov 16, 2013) | |
I want to know, you import import java.util.* -> then you import - import java.util.TreeMap, in import java.util.*( what is the purpose of the .*) which will bring all util packages, is it? please explain. |
Shashi said: (Nov 26, 2013) | |
As per my understanding: Only import java.util.TreeMap; is sufficient to execute the above code. If you have used import java.util.*; then no need to import anything. |
Bhavishya said: (Aug 24, 2014) | |
If * includes all the classes in util. Why to import treemap separately? |
Aroosh said: (Dec 12, 2014) | |
There is no need of java.util.TreeMap if you are using java.util.*. |
Cesar Navarro said: (Feb 20, 2015) | |
The correct answer it's "B" because the question say: added - "independently"-. You can just add. import java.util.treeMap; Or just add. import java.util.*; And those two statements works independently. |
Syed Shahzad said: (Apr 16, 2015) | |
Option D and B both are correct, if TreeMap is only required to be imported. |
Papa Rao said: (Apr 28, 2017) | |
According to me, import java.util.*; is enough. |
Post your comments here:
Name *:
Email : (optional)
» Your comments will be displayed only after manual approval.