hi, I just want to give a example package is just like a bag. Where you place items. say you have placed some books, pen, pencil etc in a bag. here books,pen,pencil are java code. now even i have a bag with same/different items and assume both of our bags are placed next to each other. A third party want to make use of your items. How do he refer's. For that he calls your bag name with item he wants to use. for this to happen he uses "import" . package is to define your bag name. And import is to use the content of the bag. Hope this help. All the best -arun
Sharing is learning
Joined: Feb 03, 2002
Thank you for analogy. I understand now!
subject: package statement and import statement difference?