i made a class MyClass ,put it in 1 package. Using it in another class Test1 ,in another package. like MyClass m=new MyClass(); its giving error , ,MyClass is not public ,cant be access inotsside package. I made MyClass public and even its constructr public ,which as not reqd. what cud be the reason
I am assuming that you have created MyClass's instance in Test1 class. As long as MyClass has default access modifier & both classes are in different packages, you can't access MyClass from Test1. If you are not clear please post the exact code so that someone can reply you properly.