Change this to your question / problem / query
package p1
public class C1 {
void display()
{
System.out.println("Hello World!");
}
}
package p1;
public class C3 {
public static void main(String[] args) {
C1 c =new C1();
c.display();
// TODO Auto-generated method stub
}
}
package p2;
import p1.*;
public class C2 {
public static void main(String[] args) {
C1 c =new C1();
c.display();
}
}
here we are creating the objects for class C1 within the same packages as well as in another package