I created two packages namely "pA" and "pB" with class "pA" and "PB" defined in them respectively .
Now when i am trying to access public member of package "pA" it gives a compiler error addressing that package does not exist.
Any one kindly help me figure out the real flaw in this. Here is the code.
Yup, the import statement is incorrect as Ritchie stated.
Bad class and package naming convention which created confusion.
Try a full and meaningful naming:
In this case class "pA" is default in package pA so, only classes in the same package can access it. You access class "pA" members you need a full qualified class name (i.e pA.pA or pA.pA.x) ) in this case.
"Your life is in your hands, to make of it what you choose."