What are java packages?



What are java packages?..

Answer / Manoj Kumar Gupta

"In Java, a package is a namespace that contains related classes and interfaces. It helps to avoid naming conflicts between identifiers in different applications or libraries. To create a custom package, you can organize your source code files into subdirectories with the same name as the package. The package declaration at the top of the source file specifies the package name."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Can we change the scope of the overridden method in the subclass?

1 Answers  


What does yield method of the thread class do?

1 Answers  


Is array primitive data type in java?

1 Answers  


What happens when a main method is declared as private?

22 Answers   DELL, Infosys, L&T, Sun Microsystems,


class A { private int i; } class B extends A { private int i; } if I create an object of B class what will be the memory of that object.

2 Answers   Yamaha,


difference between arraylist and linkedlist otherthan performance

2 Answers   L&T,


Explain methods specific to list interface?

1 Answers  


Can we override the static method?

1 Answers  


How the threads are synchronized?

2 Answers   BMC, CTS,


Why heap memory is called heap?

1 Answers  


How do you add an element to an arraylist in java?

1 Answers  


Why is it called buffering?

1 Answers  


Categories