Packages Interview Question for fresher

1. What do you mean by package and what it contains?
2. What is the difference between user defined package and predefined package?
3. What are coding conventions must fallow while declaring user defined package names?
4. Is it possible to declare motile packages in single source file?
5. What do you mean by import?
6. What is the location of predefined packages in our system?
7. How many types of imports present in java explain it?
8. How to import individual class and all classes of packages and which one is recommended?
9. What do you mean by static import?
10. What is the difference between normal and static import?
11. Is it possible to import multiple packages in single source file?
12. Is it possible to declare multiple packages in single source file?
13. I am importing two packages, both packages contains one class with same name at that situation how to create object of two package classes?
14. If we are importing root package at that situation is it possible to use sub package classes in our applications?
15. What is difference between main package and sub package?
16. If source file contains package statement then by using which command we are compiling that source file?
17. What do you mean by fully qualified name of class?
18. What is the public modifier?
19. What is the default modifier in java?
20. What is the public access and default access?
21. What is private access and protected access?
22. What is the difference between public methods and default method?
23. What is the difference between private method and protected method?
24. What is most restricted modifier in java?
25. What is most accessible modifier in java?

Comments

Popular posts from this blog

Exception Handling

Wrapper Class

Collections Framework Interview Questions for Fresher and Experienced