What are namespaces in java?



What are namespaces in java?..

Answer / Mohan Singh

"In Java, namespaces provide a way to organize classes, interfaces, and enums within packages. They help avoid naming conflicts by ensuring that every identifier is unique within its own namespace. However, Java does not have explicit support for namespaces like other languages such as C++. Instead, Java achieves similar functionality using packages."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

There are 100 keys and values in HashMap.how to get the keys and values?

1 Answers   IBS,


What does i ++ mean in Java?

1 Answers  


What is an abstract class and abstract method?

5 Answers  


Are maps ordered java?

1 Answers  


why we write public static void main (String args[]) in core java plz explain briefly??????????????????

3 Answers   HCL,


Can a source file contain more than one class declaration?

1 Answers  


What is == mean?

1 Answers  


Difference between Superclass and Subclass?

7 Answers  


what is purpose of collections.unmodified() method..?

1 Answers   Accenture,


What are the two main uses of volatile in Java?

1 Answers  


What is the scope or life time of instance variables?

1 Answers  


How do you escape sequences in java?

1 Answers  


Categories